#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vecll = vector<long long>;
#define all(c) (c).begin(), (c).end()
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)

int main()
{
    ll n, m;
    cin >> n;
    vecll a(n), b, result;
    for (auto &x : a)
        cin >> x;

    cin >> m;
    b.resize(m);
    for (auto &y : b)
        cin >> y;

    set_difference(all(a), all(b), inserter(result, end(result)));

    for (auto &z : result)
        cout << z << endl;
}
