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.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    static class Cut implements Comparable<Cut> {
        int kind;
        int x1;
        int y1;
        int x2;
        int y2;

        Cut(int x1, int y1, int x2, int y2) {
            this.x1 = x1;
            this.y1 = y1;
            this.x2 = x2;
            this.y2 = y2;
            if (x1 == x2) kind = 1; else kind = 2;
            if (x1 >= x2 && y1 >= y2) {
                this.x1 = x2;
                this.y1 = y2;
                this.x2 = x1;
                this.y2 = y1;
            }
        }

        public int compareTo(Cut o) {
            if (kind != o.kind) return kind - o.kind;
            if (kind == 1) {
                if (x1 != o.x1) return x1 - o.x1;
                return y1 - o.y1;
            } else {
                if (y1 != o.y1) return y1 - o.y1;
                return x1 - o.x1;
            }
        }
    }

    static class LineDesc {
        List<Cut> cuts = new ArrayList<Cut>(0);
        int totalLen;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int maxx = in.nextInt();
        int maxy = in.nextInt();
        int k = in.nextInt();
        Cut[] cuts = new Cut[k];
        for (int i = 0; i < k; ++i) {
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();
            cuts[i] = new Cut(x1, y1, x2, y2);
        }
        Random random = new Random(543715431531L);
        for (int i = 0; i <  k; ++i) {
            int j = i + random.nextInt(k - i);
            Cut tmp = cuts[i];
            cuts[i] = cuts[j];
            cuts[j] = tmp;
        }
        Arrays.sort(cuts);
        List<LineDesc> remains = new ArrayList<LineDesc>();
        int[] cnt = new int[3];
        boolean[] usedx = new boolean[k + 2];
        boolean[] usedy = new boolean[k + 2];
        int i = 0;
        while (i < cuts.length) {
            ++cnt[cuts[i].kind];
            int j = i;
            LineDesc cur = new LineDesc();
            if (cuts[i].kind == 1) {
                if (cuts[i].x1 < usedx.length) usedx[cuts[i].x1] = true;
                while (j < cuts.length && cuts[j].kind == cuts[i].kind && cuts[j].x1 == cuts[i].x1) ++j;
                int rightmost = 0;
                for (int t = i; t < j; ++t) {
                    if (cuts[t].y1 > rightmost) {
                        cur.cuts.add(new Cut(cuts[i].x1, rightmost, cuts[i].x1, cuts[t].y1));
                    }
                    rightmost = Math.max(rightmost, cuts[t].y2);
                }
                if (maxy > rightmost) {
                    cur.cuts.add(new Cut(cuts[i].x1, rightmost, cuts[i].x1, maxy));
                }
            } else {
                if (cuts[i].y1 < usedy.length) usedy[cuts[i].y1] = true;
                while (j < cuts.length && cuts[j].kind == cuts[i].kind && cuts[j].y1 == cuts[i].y1) ++j;
                int rightmost = 0;
                for (int t = i; t < j; ++t) {
                    if (cuts[t].x1 > rightmost) {
                        cur.cuts.add(new Cut(rightmost, cuts[i].y1, cuts[t].x1, cuts[i].y1));
                    }
                    rightmost = Math.max(rightmost, cuts[t].x2);
                }
                if (maxx > rightmost) {
                    cur.cuts.add(new Cut(rightmost, cuts[i].y1, maxx, cuts[i].y1));
                }
            }
            remains.add(cur);
            i = j;
        }
        int grundy = 0;
        for (LineDesc l : remains) {
            l.totalLen = 0;
            for (Cut x : l.cuts)
                l.totalLen += Math.abs(x.x1 - x.x2) + Math.abs(x.y1 - x.y2);
            grundy ^= l.totalLen;
        }
        for (i = 1; i < maxx; ++i)
            if (!usedx[i]) {
                LineDesc cur = new LineDesc();
                cur.cuts.add(new Cut(i, 0, i, maxy));
                cur.totalLen = maxy;
                remains.add(cur);
                if ((maxx - 1 - cnt[1]) % 2 != 0)
                    grundy ^= maxy;
                break;
            }
        for (i = 1; i < maxy; ++i)
            if (!usedy[i]) {
                LineDesc cur = new LineDesc();
                cur.cuts.add(new Cut(0, i, maxx, i));
                cur.totalLen = maxx;
                remains.add(cur);
                if ((maxy - 1 - cnt[2]) % 2 != 0)
                    grundy ^= maxx;
                break;
            }
        if (grundy == 0) {
            out.println("SECOND");
        } else {
            out.println("FIRST");
            for (LineDesc l : remains) {
                int len = l.totalLen;
                int need = len ^ grundy;
                if (need < len) {
                    int sx;
                    int sy;
                    int dx;
                    int dy;
                    if (l.cuts.get(0).kind == 1) {
                        sx = l.cuts.get(0).x1;
                        sy = 0;
                        dx = 0;
                        dy = 1;
                    } else {
                        sx = 0;
                        sy = l.cuts.get(0).y1;
                        dx = 1;
                        dy = 0;
                    }
                    int toKill = len - need;
                    int rightmost = -1;
                    for (Cut x : l.cuts) {
                        int thisLen = Math.abs(x.x1 - x.x2) + Math.abs(x.y1 - x.y2);
                        if (thisLen >= toKill) {
                            rightmost = (x.x1 - sx) + (x.y1 - sy) + toKill;
                            break;
                        }
                        toKill -= thisLen;
                    }
                    if (rightmost < 0) throw new RuntimeException();
                    out.println(sx + " " + sy + " " + (sx + rightmost * dx) + " " + (sy + rightmost * dy));
                    break;
                }
            }
        }
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }