AT_abc417_b [ABC417B] Search and Delete
Description
Takahashi has an integer sequence $ A=(A_1,A_2,\ldots,A_N) $ of length $ N $ .
It is guaranteed that $ A $ is non-decreasing.
Takahashi performs $ M $ operations on this integer sequence. In the $ i $ -th operation $ (1\leq i\leq M) $ , he performs the following operation:
> If the sequence $ A $ contains $ B_i $ as an element, select one such element and delete it. If no such element exists, do nothing.
>
> Note that since $ A $ is non-decreasing, the sequence after the operation is uniquely determined regardless of the choice of element, and remains non-decreasing.
Find $ A $ after performing $ M $ operations.
What is non-decreasing?A sequence $ X=(X_1,X_2,\ldots,X_K) $ is non-decreasing if $ X_i\leq X_{i+1} $ holds for all $ i $ $ (1\leq i\leq K-1) $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ M $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $ $ B_1 $ $ B_2 $ $ \ldots $ $ B_M $
Output Format
Output the elements of $ A $ after the operations, in order, separated by spaces on a single line.
If $ A $ is empty after the operations, output nothing.
Explanation/Hint
### Sample Explanation 1
Initially, $ A $ is $ A=(1,2,2,3,3,3,5,6) $ .
The operations are performed as follows:
- Delete one $ 2 $ from $ A $ , and $ A $ becomes $ A=(1,2,3,3,3,5,6) $ after the operation.
- Delete one $ 2 $ from $ A $ , and $ A $ becomes $ A=(1,3,3,3,5,6) $ after the operation.
- Since $ A $ does not contain $ 7 $ as an element, do nothing. $ A $ remains $ A=(1,3,3,3,5,6) $ after the operation.
- Delete one $ 3 $ from $ A $ , and $ A $ becomes $ A=(1,3,3,5,6) $ after the operation.
- Since $ A $ does not contain $ 2 $ as an element, do nothing. $ A $ remains $ A=(1,3,3,5,6) $ after the operation.
Therefore, after all operations, $ A=(1,3,3,5,6) $ , so output the elements in this order separated by spaces.
### Sample Explanation 2
$ A $ becomes empty after the operations, so output nothing.
### Constraints
- $ 1 \leq N \leq 100 $
- $ 1 \leq M \leq 100 $
- $ 1 \leq A_i,B_i \leq 10^9 $
- The integer sequence $ A $ is non-decreasing.
- All input values are integers.