The lockdown hasn’t been great for our chef as his restaurant business got sabotaged because of lockdown, nevertheless no worries our chef is a multi-talented guy. Chef has decided to be a freelancer and work remotely. According to chef’s maths, he should be able to work on maximum tasks assuming that he can only work on a single task at a time. 
Assume that chef does N tasks. The start and finish time units of those tasks are given. Select the maximum number of tasks that can be performed by a chef, assuming that a he can only work on a single task at a time.

-----Input:-----
- The first input contains of size of array N representing the total number of tasks.
- The second and third lines contains N space-seperated integers representing the starting and finish time of the the tasks.

-----Output:-----
A single line containing indices of tasks that chef will be able to do.

-----Constraints-----
- $1 \leq N \leq 10^5$
- Note: The lists have been sorted based on the ending times of the tasks.

-----Sample Input 1:-----
3

10 12 20

20 25 30  

-----Sample Output 1:-----
0  2 

-----Sample Input 2:-----
6

1 2 0 6 3 7

2 4 5 7 9 10  

-----Sample Output 2:-----
0  1  3  5

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
n = int(input())
count = []
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
start = 0
for i in range(n):
	if a[i] >= start:
		count.append(i)
		start = b[i]
print(*count, sep=' ')


try:
	n = int(input())
	l1 = [int(x) for x in input().split()]
	l2 = [int(x) for x in input().split()]
	ans = []
	t2 = -1
	for i in range(n):
		if t2 <= l1[i]:
			ans.append(i)
			t2 = l2[i]
	for e in ans:
		print(e, end=' ')
except EOFError:
	pass


n = int(input())
start = list(map(int, input().split()))
finish = list(map(int, input().split()))
task = [0]
act = 0
for i in range(1, n):
	if start[i] >= finish[act]:
		task.append(i)
		act = i
for i in task:
	print(i, end=' ')


ans = []

def printMaxActivities(s, f):
	n = len(f)
	i = 0
	ans.append(i)
	for j in range(n):
		if s[j] >= f[i]:
			ans.append(j)
			i = j
n = int(input())
s = list(map(int, input().split()))
f = list(map(int, input().split()))
printMaxActivities(s, f)
print(*ans)


size = int(input())
starting_times = list(map(int, input().split()))
ending_times = list(map(int, input().split()))
tasks_indices_set = set()
last_timing = 0
for i in range(size):
	if starting_times[i] >= last_timing:
		tasks_indices_set.add(i)
		last_timing = ending_times[i]
		for j in range(i + 1, size):
			if ending_times[i] <= starting_times[j]:
				tasks_indices_set.add(j)
				last_timing = ending_times[j]
				break
print(*sorted(tasks_indices_set))


n = int(input())
s = list(map(int, input().split()))
f = list(map(int, input().split()))
t = list(map(lambda x, y: (x, y), s, f))
end = 0
tt = []
k = 0
for (i, j) in t:
	if not tt:
		tt.append(k)
		end = j
		k += 1
		continue
	if i >= end:
		tt.append(k)
		end = j
	k += 1
for i in tt:
	print(i, end=' ')
print()


n = int(input())
arr = list(map(int, input().split()))
brr = list(map(int, input().split()))
x = brr[0]
print(0, end=' ')
for i in range(n):
	if arr[i] >= x:
		print(i, end=' ')
		x = brr[i]


n = int(input())
start = [int(x) for x in input().split()]
end = [int(x) for x in input().split()]
out = [0]
pos = end[0]
for i in range(1, len(start)):
	if start[i] >= pos:
		out.append(i)
		pos = end[i]
x = ' '.join([str(elem) for elem in out])
print(x)


n = int(input())
st = [int(i) for i in input().split()]
et = [int(i) for i in input().split()]
temp = et[0]
t = [0]
for i in range(1, n):
	if st[i] >= temp:
		temp = et[i]
		t.append(i)
for i in range(len(t)):
	print(t[i], end=' ')


n = int(input())
arr1 = list(map(int, input().strip().split()))
arr2 = list(map(int, input().strip().split()))
key = arr2[0]
print(0, end=' ')
i = 1
while i < n:
	if arr1[i] >= key:
		key = arr2[i]
		print(i, end=' ')
	else:
		i += 1


try:
	n = int(input())
	arr = list(map(int, input().split()))
	brr = list(map(int, input().split()))
	test = []
	c = brr[0]
	test.append(0)
	for i in range(n):
		if arr[i] >= c:
			test.append(i)
			c = brr[i]
	result = map(str, test)
	print(' '.join(result))
except EOFError:
	pass


t = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
z = []
u = 0
for i in range(0, t):
	if x[i] >= u:
		print(i, end=' ')
		u = y[i]


N = int(input())
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
timings = []
for i in range(N):
	timings.append([l1[i], l2[i]])
end = timings[0][1]
tasks = [0]
for i in range(1, len(timings)):
	if timings[i][0] >= end:
		end = timings[i][1]
		tasks.append(i)
print(*tasks)


a = int(input())
l = list(map(int, input().split()))
r = list(map(int, input().split()))
e = r[0]
ans = [0]
for i in range(len(l)):
	if l[i] >= e:
		e = r[i]
		ans.append(i)
print(*ans)


a = int(input())
b = list(map(int, input().split()))
c = list(map(int, input().split()))
d = []
q = 0
for i in range(a):
	if b[i] >= q:
		d.append(i)
		q = c[i]
for i in d:
	print(i, end=' ')


try:
	n = int(input())
	s = list(map(int, input().split()))
	e = list(map(int, input().split()))
	flag = 0
	o = []
	for i in range(len(s)):
		if s[i] >= flag:
			o.append(i)
			flag = e[i]
	for i in o:
		print(i, ' ', end='')
except:
	pass