Operations on a graphics card (a GPU) are very parallelizable. So, if itβs possible to perform the same type of operation on many numbers simultaneously, it would be faster than performing different types of operations. The team is currently testing their code, so they ask you to write a program that would validate an addition of many numbers modulo a different number.
Given two lists of integers and , you are asked to calculate the sum of each pair and modulo :
Note that different languages implement the modulo operation differently. Python always makes sure that the result is positive. Yet, languages like C++ can give negative results after modulo (-3 % 2 β -1). A very popular trick is to add the modulo m to the result if itβs negative with an if statement. A more generic way of handling such cases is by adding m and taking the modulo again: ((a % m) + m) % m. This would make sure that the result is always positive.
Input
The first line of the input contains a single integer n (1 β€ n β€ 100 000) the number of elements.
The second line contains n space-separated integers ( β€ β€ ).
The next line contains n space-separated integers ( β€ β€ ).
The last line contains n space-separated integers (1 β€ β€ ).
Output
The program should print n space-separated integers - .