A good problem should have a concise statement.
You are given an array $a$ of length $n$, initially filled with zeros, and another array $b$ of length $n$. Your goal is to transform array $a$ into array $b$. You can perform the following two types of operations:
- $1\ x$: Add $1$ to all elements in $a$ that are equal to $x$.
- $2\ x$: Add $1$ to the element in $a$ at index $x$.
You can perform no more than $20\,000$ operations.
Input
The first line contains a positive integer $n$ ($1 \le n \le 1000$).
The second line contains $n$ non-negative integers representing the array $b$ ($0 \le b_i \le n$).
Output
The first line should contain an integer $k$, representing the number of operations.
The following $k$ lines should each contain two integers $1\ x$ or $2\ x$, representing an operation. For the operation type $1\ x$, you must ensure that $0 \le x \le n$. For the operation type $2\ x$, you must ensure that $1 \le x \le n$.
Examples
Input 1
4 2 4 3 1
Output 1
8 2 1 2 2 2 3 1 1 2 4 2 2 2 3 2 2