You are using `set`

data-structure but you are not using the basic definition of the set i.e. A set is an **unordered collection** of distinct elements/objects.

Now when you performed the subtraction between the set `total_jobs_set - jobs_completed_set`

, you are left with the set of `jobs`

which are not completed, but the set is unordered, and as per the problem description, chef always chooses an even index job and his assistant always chooses an odd indexed job according to `zero-base indexing`

, so you need to first sort the set to establish the order in the set and then use slice operator `[::]`

to print the answer.

Below is a code for an **AC** solution for your reference.

```
def compute_the_assigned_jobs(jobs_set,jobs_completed_set):
jobs_uncompleted_set = jobs_set - jobs_completed_set
jobs_uncompleted_set = sorted(list(jobs_uncompleted_set))
print(' '.join(map(str,jobs_uncompleted_set[0::2])))
print(' '.join(map(str,jobs_uncompleted_set[1::2])))
def main():
for t in range(int(input().rstrip())):
n, m = tuple(map(int,input().rstrip().split()))
jobs_completed_set = set(map(int,input().rstrip().split()))
jobs_set = set([i for i in range(1,n + 1)])
compute_the_assigned_jobs(jobs_set,jobs_completed_set)
if __name__ == "__main__":
main()
```

##
Test-Cases

```
Input:
4
6 3
2 4 1
3 2
3 2
8 2
3 8
19 17
15 14 8 5 1 17 10 13 3 7 18 16 2 12 9 6 19
Output:
3 6
5
1
1 4 6
2 5 7
4
11
```

Thanks for reading.

Peace