参考になったのは
1)とりあえずデータを取得しておく
2)ポップ関数で要素を頭から減らす
3)重複は1つだけにして減らしてB配列として定義
4)出力
N,K,F = map(int,input().split())
A = [int(input()) for _ in range(K)]
for i in range(F):
A.pop(0)
#重複取り除いたのをB列へ
B = []
for i in range(len(A)):
if i == 0:
B.append(A[i])
else:
for i in range(len(A)):
if A[i] not in B:
B.append(A[i])
#順番はそのままで出力
print(*B,sep="\n")