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.*;
import java.util.Map.Entry;

public class C {
	private static BufferedReader in;

	public void run() throws IOException {
		StringTokenizer st = new StringTokenizer(in.readLine());
		int xm = Integer.parseInt(st.nextToken());
		int ym = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken());		
		Map<Integer, ArrayList<Integer>> hor = new TreeMap<Integer, ArrayList<Integer>>();
		Map<Integer, ArrayList<Integer>> ver = new TreeMap<Integer, ArrayList<Integer>>();
		for (int i = 0; i < k; i++) {
			st = new StringTokenizer(in.readLine());
			int x1 = Integer.parseInt(st.nextToken());
			int y1 = Integer.parseInt(st.nextToken());
			int x2 = Integer.parseInt(st.nextToken());
			int y2 = Integer.parseInt(st.nextToken());
			if (x1 == x2) {
				addSegment(ver, x1, y1, y2);
			} else {
				addSegment(hor, y1, x1, x2);
			}
		}
		int xor = 0;
		if ((xm - 1 - ver.size()) % 2 != 0) {
			xor ^= ym;
		}
		if ((ym - 1 - hor.size()) % 2 != 0) {
			xor ^= xm;
		}
		for (ArrayList<Integer> segs : ver.values()) {
			xor ^= xor(segs, ym);
		}
		for (ArrayList<Integer> segs : hor.values()) {
			xor ^= xor(segs, xm);
		}
		if (xor == 0) {
			System.out.println("SECOND");
			return;
		}
		System.out.println("FIRST");
		if (((xm - 1 - ver.size()) > 0) && (ym > (ym ^ xor))) {
			int x = 1;
			while (ver.containsKey(x)) {
				x++;
			}
			System.out.println(x + " " + 0 + " " + x + " " + (ym - (ym ^ xor)));
			return;
		}
		if (((ym - 1 - hor.size()) > 0) && (xm > (xm ^ xor))) {
			int y = 1;
			while (hor.containsKey(y)) {
				y++;
			}
			System.out.println(0 + " " + y + " " + (xm - (xm ^ xor)) + " " + y);
			return;
		}
		for (Entry<Integer, ArrayList<Integer>> entry : ver.entrySet()) {
			ArrayList<Integer> segs = entry.getValue();
			int v = xor(segs, ym);
			if (v > (v ^ xor)) {
				int y = bite(segs, v ^ xor, ym);
				int x = entry.getKey();
				System.out.println(x + " " + y + " " + x + " " + ym);
				return;
			}
		}
		for (Entry<Integer, ArrayList<Integer>> entry : hor.entrySet()) {
			ArrayList<Integer> segs = entry.getValue();
			int v = xor(segs, xm);
			if (v > (v ^ xor)) {
				int x = bite(segs, v ^ xor, xm);
				int y = entry.getKey();
				System.out.println(x + " " + y + " " + xm + " " + y);
				return;
			}
		}
	}

	private int bite(ArrayList<Integer> segs, int amount, int ri) {
		int le = 0;
		while (le + 1 < ri) {
			int m = (le + ri) / 2;
			if (xor(segs, m) > amount) {
				ri = m;
			} else {
				le = m;
			}
		}
		return le;
	}

	private int xor(ArrayList<Integer> segs, int len) {
		len *= 2;
		Collections.sort(segs);
		int open = 0;
		int p = 0;
		int res = 0;
		for (int s : segs) {
			if (s >= len) {
				break;
			}
			if (s % 2 == 0) {
				open++;
				if (open == 1) {
					res += s / 2 - p;
				}
			} else {
				open--;
				p = s / 2;
			}
		}
		if (open == 0) {
			res += len / 2 - p;
		}
		return res;
	}

	private void addSegment(Map<Integer, ArrayList<Integer>> ver, int x1, int y1, int y2) {
		if (!ver.containsKey(x1)) {
			ver.put(x1, new ArrayList<Integer>());
		}
		if (y1 > y2) {
			int t = y1; y1 = y2; y2 = t;
		}
		ver.get(x1).add(2 * y1);
		ver.get(x1).add(2 * y2 + 1);
	}

	public static void main(String[] args) throws IOException {
		Locale.setDefault(Locale.US);
		in = new BufferedReader(new InputStreamReader(System.in));
		new C().run();
		in.close();
	}
}