#F. 你学完了?我羡慕了

    Type: Default 1000ms 256MiB

你学完了?我羡慕了

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

临近课程结课,小C同学十分紧张.

Description

虽然小C同学已经在学习的路上,但看到有许多人已经同时学完了学科A和学科B心里十分羡慕,他观察了周围n名同学并记录了他们的学习情况,请你帮忙统计一下有哪几个人同时完成了学科A和学科B的学习 。

Format

Input

第一行为两个整数 n,m --分别表示学完学科A和学科B的同学的人数

第二行为n个整数,表示学完学科A的同学学号

第三行为m个整数,表示学完学科B的同学学号

注:1<=n,m<=1e5,1<=学号<=1e9

Output

输出一行,为同时学习完A,B学科的同学的学号,按在学科A中学号名单中的先后次序输出

Samples

4 3
1 5 15 6
8 1 6
1 6

Limitation

1s, 1024KiB for each test case.

新生周赛第六场(DIV. 4)

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2022-12-3 9:00
End at
2022-12-3 11:00
Duration
2 hour(s)
Host
Partic.
33