I am getting wa on test1 in my submission of this problem https://codeforces.me/problemset/problem/1990/E1.
This is my submission: https://codeforces.me/contest/1990/submission/318085732.
When i run my code manualy on my computer and answer the queries manualy I get correct solution for test1. But when i submit I get wa. Can someone tell me where is the problem in my code? It is possible that my algorithm is wrong for the overall solution of a problem so please dont tell me what solution of problem is.








The issue is this
Do this instead
Why would it give WA??
The code outputs "!" then run the solution which cause presentation error as the solution asks queries