Alyona And Mex

easy
<a href="https://codeforces.com/contest/739/problem/A">https://codeforces.com/contest/739/problem/A</a>

Input Format

.

Output Format

.

Constraints

.

Notice

.

Example

Input
5 3
1 3
2 5
4 5
Output
2
1 0 2 1 0
Previous
Sequence Transformation
Next
Marina And Vasya

Related Questions