#CCBCHBAHAI0000039. Xóa lần xuất hiện đầu tiên của x (Delete the First Occurrence of x)

Xóa lần xuất hiện đầu tiên của x (Delete the First Occurrence of x)

Xóa lần xuất hiện đầu tiên của x (Delete the First Occurrence of x)

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem

Given an integer array a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1} and an integer xx.

If there exists an index ii such that ai=xa_i=x, define

p=min⁡{i∣0≤i<n, ai=x}.p=\min\{i\mid 0\le i<n,\ a_i=x\}.

Delete only the element at index pp and preserve the relative order of all remaining elements.

If the set is empty, meaning that xx does not occur in the array, leave the array unchanged.

Print the logical size after the operation and the resulting array.

Input

The first line contains integers n,xn,x. The second line contains nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print the size after the operation on the first line. If the size is positive, print the resulting array on the second line.

Subtask

Subtask 1 (100 points): 1≤n≤2⋅1051\le n\le2\cdot10^5; ∣x∣,∣ai∣≤109|x|,|a_i|\le10^9.

Example

Input

6 3
3 1 3 2 3 4

Output

5
1 3 2 3 4

Explanation

The first occurrence of 3 is at index 0. Only that element is deleted; the other two 3s remain.