#d1107. 序列操作
序列操作
Sequence Operations
Problem Description
You are given a sequence of length .
You need to perform two kinds of operations:
1 x y— change the -th element to ;2 y— change every element that is less than to .
After performing operations in total, output the resulting sequence.
Input Format
The first line contains two integers ().
The second line contains integers ().
The next lines each describe one operation: 1 x y or 2 y (, ).
Output Format
Output one line containing the resulting sequence, with the integers separated by spaces.
Sample Input
5 5
3 6 14 16 12
2 13
2 16
1 1 1
1 2 14
2 11
Sample Output
11 14 16 16 16