CF486E LIS of Sequence

Description

The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For better understanding, Nam decided to learn it a few days before the lesson. Nam created a sequence $ a $ consisting of $ n $ ( $ 1

Input Format

The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For better understanding, Nam decided to learn it a few days before the lesson. Nam created a sequence $ a $ consisting of $ n $ ( $ 1

Output Format

Print a string consisting of $ n $ characters. $ i $ -th character should be '1', '2' or '3' depending on which group among listed above index $ i $ belongs to.

Explanation/Hint

The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For better understanding, Nam decided to learn it a few days before the lesson. Nam created a sequence $ a $ consisting of $ n $ ( $ 1