#include using namespace std; #define rep(n) for(int i =0;i<(int)(n);i++) int main(){ int a,b; cin>>a>>b; vectorc(a),d(b); rep(a)cin>>c[i]; rep(b)cin>>d[i]; sort(c.begin(),c.end()); for(auto& x :d)cout<<(upper_bound(c.begin(),c.end(),x)-lower_bound(c.begin(),c.end(),x))<<' '; cout<