Money Mismanagement


Indra is not very good at managing their money. They try to purchase items without checking their bank account, and don't know which purchase went through, or which ones failed. Could you write a program to help them?

Indra begins with nn dollars, and there are mm events that occur in order: either Indra receives their paycheck of xx dollars, or tries to purchase an item worth xx dollars. If Indra has less than xx dollars in their account, the purchase fails, and Indra loses no money.

Input

The first line contains integers nn and mm, the starting money and the number of events respectively. The following mm lines contain each event, of the following form:

  • 1 x, which represents Indra receiving xx dollars
  • 2 x, which represents Indra attempting to purchase an item worth xx.

Output

For each purchase attempt, output a line containing SUCCEED or FAIL.

Constraints

  • 1≤n,m,x≤10001 \le n,m,x \le 1000

Example 1

Input 1
3 10
1 5
1 4
2 6
1 1
2 3
2 4
2 9
2 9
1 4
1 4
Output 1
SUCCEED
SUCCEED
SUCCEED
FAIL
FAIL

Example 2

Input 2
1 10
2 3
1 5
1 2
1 5
1 5
2 5
2 9
1 2
1 2
1 2
Output 2
FAIL
SUCCEED
SUCCEED

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.