func main() var ss: [][]char :: cui@input().split(" ") var n: int :: ss[0].toInt(&) var m: int :: ss[1].toInt(&) var mp: dict :: #dict do ss :: cui@input().split(" ") for i(0, n - 1) var val: int :: ss[i].toInt(&) do mp.add(val, mp.get(val, &) + 1) end for do ss :: cui@input().split(" ") for i(0, m - 1) do cui@print("\{mp.get(ss[i].toInt(&), &)}" ~ (i = m - 1 ?("\n", " "))) end for end func