#include <iostream>
#include <cstdlib>
#include <set>
#include <algorithm>
#include <iterator>

using namespace std;
int main()
{
    int n, m, tmp;
    set<int> a, b, result;
    cin >> n;
    for (int i=0; i<n; ++i){
        cin >> tmp;
        a.insert(tmp);
    }
    cin >> m;
    for (int i=0; i<m; ++i){
        cin >> tmp;
        b.insert(tmp);
    }
    set_difference(a.begin(), a.end(), b.begin(), b.end(), inserter(result, result.end()));
    for (auto itr=result.begin(); itr != result.end(); ++itr){
        cout << *itr << endl;
    }
}
