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