Problem: Two players play the following game. Initially, the players have a knife and a rectangular sheet of paper, divided into equal square grid cells of unit size. The players make moves in turn, the player who can't make a move loses. In one move, a player can take the knife and cut the paper along any segment of the grid line (not necessarily from border to border). The part of the paper, that touches the knife at least once, is considered cut. There is one limit not to turn the game into an infinite cycle: each move has to cut the paper, that is the knife has to touch the part of the paper that is not cut before.

Obviously, the game ends when the entire sheet is cut into 1 × 1 blocks. During the game, the pieces of the sheet are not allowed to move. It is also prohibited to cut along the border. The coordinates of the ends of each cut must be integers.

You are given an n × m piece of paper, somebody has already made k cuts there. Your task is to determine who will win if the players start to play on this sheet. You can consider that both players play optimally well. If the first player wins, you also need to find the winning first move.

Input

The first line contains three integers n, m, k (1 ≤ n, m ≤ 109, 0 ≤ k ≤ 105) — the sizes of the piece of paper and the number of cuts. Then follow k lines, each containing 4 integers xbi, ybi, xei, yei (0 ≤ xbi, xei ≤ n, 0 ≤ ybi, yei ≤ m) — the coordinates of the ends of the existing cuts. 

It is guaranteed that each cut has a non-zero length, is either vertical or horizontal and doesn't go along the sheet border.

The cuts may intersect, overlap and even be the same. That is, it is not guaranteed that the cuts were obtained during any correct game.

Output

If the second player wins, print "SECOND". Otherwise, in the first line print "FIRST", and in the second line print any winning move of the first player (the coordinates of the cut ends, follow input format to print them).

Examples

Input

2 1 0


Output

FIRST
1 0 1 1


Input

2 2 4
0 1 2 1
0 1 2 1
1 2 1 0
1 1 1 2


Output

SECOND

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map.Entry;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeMap;

import javax.management.RuntimeErrorException;

public class B {

	public static void main(String[] args) throws IOException {
		InputReader in = new InputReader();
		int n = in.nextInt();
		int m = in.nextInt();
		int k = in.nextInt();
		TreeMap<Integer, ArrayList<seg>> tr = new TreeMap<Integer, ArrayList<seg>>();
		TreeMap<Integer, Integer> av = new TreeMap<Integer, Integer>();
		boolean[] vr = new boolean[100002];
		boolean[] vc = new boolean[100002];
		for (int i = 0; i < k; i++) {
			int xb = in.nextInt();
			int yb = in.nextInt();
			int xe = in.nextInt();
			int ye = in.nextInt();
			ArrayList<seg> t;

			if (xb == xe) {
				int t1 = Math.max(yb, ye);
				int t2 = Math.min(yb, ye);
				yb = t2;
				ye = t1;
				if (tr.containsKey(xb)) {
					t = tr.get(xb);
					t.add(new seg(yb, ye));
					tr.put(xb, t);
				} else {
					t = new ArrayList<seg>();
					t.add(new seg(yb, ye));
					tr.put(xb, t);
				}
				if (xb < vc.length)
					vc[xb] = true;
			} else { // ye == yb
				int t1 = Math.max(xb, xe);
				int t2 = Math.min(xb, xe);
				xb = t2;
				xe = t1;
				if (tr.containsKey(n + yb)) {
					t = tr.get(n + yb);
					t.add(new seg(xb, xe));
					tr.put(n + yb, t);
				} else {
					t = new ArrayList<seg>();
					t.add(new seg(xb, xe));
					tr.put(n + yb, t);
				}
				if (yb < vr.length)
					vr[yb] = true;
			}
		}
		int c = n - 1;
		int r = m - 1;
		int total = 0;

		for (Entry<Integer, ArrayList<seg>> x : tr.entrySet()) {
			int z = x.getKey();
			if (z <= n) {
				c--;
			} else {
				r--;
			}
			ArrayList<seg> t = x.getValue();
			Collections.sort(t);
			int s = t.get(0).s;
			int e = t.get(0).e;
			int l = 0;
			int cnt = 0;
			for (seg g : t) {
				l++;
				if (l == 1)
					continue;

				if (g.s > e) {
					cnt += e - s;
					s = g.s;
					e = g.e;
				} else {
					e = Math.max(e, g.e);
				}
			}
			cnt += e - s;
			if (z <= n) {
				av.put(z, m - cnt);
				total ^= (m - cnt);
			} else {
				av.put(z, n - cnt);
				total ^= (n - cnt);
			}
		}

		total ^= (r % 2 == 1) ? n : 0;
		total ^= (c % 2 == 1) ? m : 0;
		// System.out.println(total);
		if (total == 0) {
			System.out.println("SECOND");
		} else {
			System.out.println("FIRST");
			int tot = total;
			int d = Integer.highestOneBit(total);
			for (Entry<Integer, Integer> eee : av.entrySet()) {
				int i = eee.getKey();
				int x = eee.getValue();
				if (x - (tot ^ x) > 0) {
					total = x - (tot ^ x);
					if (total < 0){
						System.out.println(1);
						throw new RuntimeException();
					}
					ArrayList<seg> t = tr.get(i);
					Collections.sort(t);
					int s = t.get(0).s;
					long e = t.get(0).e;
					int l = 0;
					long cnt = s;
					long res = 0;
					if (cnt >= total) {
						res = total;
						if (i < n)
							System.out.println(i + " 0 " + i + " " + res);
						else
							System.out.println(" 0 " + (i - n) + " " + res
									+ " " + (i - n));
						System.exit(0);
					}
					for (seg g : t) {
						l++;
						if (l == 1)
							continue;
						if (g.s > e) {
							cnt += g.s - e;
							if (cnt >= total) {
								cnt -= g.s - e;
								res = e + total - cnt;
								if (res < 0){
									System.out.println(2);
									throw new RuntimeException();
								}
								if (i < n)
									System.out.println(i + " 0 " + i + " "
											+ res);
								else
									System.out.println(" 0 " + (i - n) + " "
											+ res + " " + (i - n));
								System.exit(0);
							}
							s = g.s;
							e = g.e;
						} else {
							e = Math.max(e, g.e);
						}

					}
					if(i<n)
					cnt += m - e;
					else
						cnt+=n-e;
					if (cnt >= total) {
						if(i<n)
							cnt -= m - e;
							else
								cnt-=n-e;
						res = e + total - cnt;
						if (res < 0){
							System.out.println(3);
							throw new RuntimeException();
						}
						if (i < n)
							System.out.println(i + " 0 " + i + " " + res);
						else
							System.out.println(" 0 " + (i - n) + " " + res
									+ " " + (i - n));
						System.exit(0);
					}
				}
			}
			if (r % 2 == 1 && n - (tot ^ n) > 0) {
				int i = -1;
				for (i = 1; i < vr.length && i < m; i++)
					if (!vr[i])
						break;
				total = n - (tot ^ n);
				System.out.println(" 0 " + i + " " + total + " " + i);
				System.exit(0);
			}
			if (c % 2 == 1 && m - (tot ^ m) > 0) {
				int i = -1;
				for (i = 1; i < vc.length && i < n; i++)
					if (!vc[i])
						break;
				total = m - (tot ^ m);
				System.out.println(i + " 0 " + i + " " + total);
				System.exit(0);
			}
		}
	}

	static class seg implements Comparable<seg> {
		int s, e;

		public seg(int s, int e) {
			this.s = s;
			this.e = e;
		}

		@Override
		public int compareTo(seg x) {
			return s - x.s;
		}

		@Override
		public String toString() {
			return "seg [s=" + s + ", e=" + e + "]";
		}

	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer st;

		public InputReader() throws IOException {
			in = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(in.readLine());
		}

		public String next() throws IOException {
			while (!st.hasMoreElements())
				st = new StringTokenizer(in.readLine());
			return st.nextToken();
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}
	}

}