Chef is a private detective. He was asked to investigate a case of murder in the city of Frangton.
Chef arrived in Frangton to find out that the mafia was involved in the case. Chef spent some time watching for people that belong to the clan and was able to build a map of relationships between them. He knows that a mafia's organizational structure consists of a single Don, heading a hierarchical criminal organization. Each member reports exactly to one other member of the clan. It's obvious that there are no cycles in the reporting system of the mafia.
There are N people in the clan, for simplicity indexed from 1 to N, and Chef knows who each of them report to. Member i reports to member Ri.
Now, Chef needs to identfy all potential killers to continue his investigation. Having considerable knowledge about the mafia's activities, Chef knows that the killer must be a minor criminal, that is, one of the members who nobody reports to. Please find the list of potential killers for Chef. Since Don reports to nobody, his Ri will be equal to 0.

-----Input-----
The first line of input contains one integer N.
Next line has N space-separated integers, the ith integer denotes Ri — the person whom the ith member reports to.

-----Output-----
Output a list of space-separated integers in ascending order — the indices of potential killers.

-----Constraints-----
- 1 ≤ N ≤ 105
- 1 ≤ Ri ≤ N except for Don, whose Ri equals to 0.
- It is guaranteed that there are no cycles in the reporting structure.

-----Subtasks-----
- Subtask #1 [50 points]: N ≤ 10000
- Subtask #2 [50 points]: No additional constraints

-----Example-----
Input:
6
0 1 1 2 2 3

Output:
4 5 6

-----Explanation-----
The reporting structure:

Difficulty: interview

Starter code:

Solutions:
n = eval(input())
r = list(map(int, input().split()))

tree = dict()
i = 1
for j in r:
 c = tree.get(j)
 if c:
  tree[j].append(i)
 else:
  tree[j] = [i]
 if not tree.get(i):
  tree[i] = []
 i += 1
s = []
for elem in tree:
 if not tree[elem]:
  s.append(str(elem))
print(' '.join(s))

T = eval(input())
arr = list(map(int,input().split(' ')))
x = set()
y = set(arr)
for i in range(T):
 x.add(i+1) 
 
for i in x.difference(y):
 print("{0}".format(i), end=' ')
print("")

n=eval(input())
arr=[0 for i in range(n)]
c=list(map(int,input().split()))
for i in range(n):
 if c[i]:arr[c[i]-1]+=1
for i in range(n):
 if arr[i]==0: print(i+1, end=' ')
print()

# cook your code here
n = int(input())
a = [int(i) for i in input().split()]
for i in range(1,n+1) :
 if i not in a :
  print(i, end=' ')

n=eval(input())
l=list(map(int, input().split()))
z=[0 for i in range(n+1)]
for i in range(n):z[l[i]]=1
for i in range(n+1):
 if z[i]==0:print(i, end=' ')
print()

n = int(input())
q = [0] * (n + 1)
t = list(map(int, input().split(" ")));
for i in t : q[i] = 1
s = ""
for i in range(1, n + 1) :
 if q[i] == 0 : s += str(i) + " "
print(s)

a=int(input())
b=list(map(int,input().split()))
c=list(set(b))
for i in range(0,a+1):
 if i not in c:
  print(i, end=' ')


a=int(input())
b=list(map(int,input().split()))

for i in range(0,a+1):
 if i not in b:
  print(i, end=' ')


n=eval(input())
reports=set(map(int,input().split()))
print(' '.join(str(i) for i in range(n+1) if i not in reports))

# your code goes here
t = int(input())
l=[0]*(t+1)
arr = list(map(int, input().split()))
for i in arr:
 if i != 0:
  l[i]+=1
ans = ""
for i in range(1, t+1):
 if l[i] == 0:
  ans+= str(i)+" "
print(ans)

  


# your code goes here
t = int(input())
l=[0]*(t+1)
arr = list(map(int, input().split()))
for i in arr:
 if i != 0:
  l[i]+=1
ans = ""
for i in range(1, t+1):
 if l[i] == 0:
  ans+= str(i)+" "
print(ans.strip())

  


n=int(input())
N=list(map(int,input().split()))
M=set(N)
a=[]
for i in range(1,n+1):
 a.append(i)
a=set(a)
b=a-M
for i in b:
 print(i, end=' ')

n=eval(input())
dons=input().split()
dons= [int(x) for x in dons]
dons=set(dons)
criminals=set(range(1,n+1))
killers=criminals-dons
print(" ".join(str(x) for x in killers))

#for i in range(1,n+1):
#   if i not in dons:
#       print i,


t=int(input())
arr=list(map(int,input().split()))
for i in range(1,t+1):
 if ( i not in arr):
  print(i, end=' ')
  
 




n = eval(input())
s = input()
numbers = list(map(int,s.split()))

s1 = set(range(1,n+1))
s2 = set(numbers)-set([0])
for i in sorted(list(s1-s2)):
 print(i, end=' ')

N = eval(input())
dict1 = {}
list1 = list(map(int, input().split()))

for i in list1:
 dict1[i] = 1

for i in range(1,N + 1):
 if i not in dict1:
  print(i, end=' ') 

N = eval(input())
R = list(map(int, input().split()))
HT = {}
for r in R:
 HT[r] = 1
for i in range(1, N+1):
 if i not in HT:
  print(i, end=' ')

# cook your code here
N=int(input())
A=[0 for _ in range(N+1)]
B=[int(x) for x in input().split()]
for x in B:
 A[x]=1
for i in range(N+1):
 if A[i] == 0:
  print(i, end=' ')