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.awt.geom.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
public class C {

    class Cut implements Comparable<Cut> {
        int a;
        int minB;
        int maxB;
        public Cut(int _a, int b1, int b2) {
            a = _a;
            minB = min(b1, b2);
            maxB = max(b1, b2);
        }
        public int len() {
            return maxB-minB;
        }
        @Override
        public int compareTo(Cut c) {
            if (a-c.a!=0) return a-c.a;
            return minB-c.minB;
        }
        @Override
        public String toString() {
            return a+" "+minB+" "+maxB;
        }
    }

    List<Cut> normalize(List<Cut> cuts) {
        Collections.sort(cuts);
        List<Cut> newCuts = new ArrayList<Cut>();
        Cut pre = cuts.get(0);
        newCuts.add(pre);
        for (int i=1; i<cuts.size(); i++) {
            Cut cur = cuts.get(i);
            if (pre.a!=cur.a||pre.maxB<cur.minB) {
                newCuts.add(cur);
                pre = cur;
            } else {
                pre.maxB = max(pre.maxB, cur.maxB);
            }
        }
        return newCuts;
    }

    int grundy(int la, int lb, List<Cut> cuts) {
        int ret = 0;
        int count = -1;
        Cut pre = cuts.get(0);
        int c = lb;
        for (int i=1; i<cuts.size(); i++) {
            Cut cur = cuts.get(i);
            if (pre.a!=cur.a) {
                ret ^= lb-c;
                c = cur.len();
                count++;
                pre = cur;
            } else {
                c += cur.len();
            }
        }
        if (((la-1-count)&1)!=0) ret ^= lb;
        return ret;
    }

    String solve(int la, int lb, List<Cut> cuts, int grundy, boolean v) {
        int i = 1;
        for (int a=1; a<la; a++) {
            int len = lb;
            for (; a==cuts.get(i).a; i++) {
                len -= cuts.get(i).len();
            }
            if ((len^grundy)<len) {
                int minB = lb-(len-(len^grundy));
                for (int j=i-1; ; j--) {
                    if (a==cuts.get(j).a&&minB<cuts.get(j).maxB) {
                        minB -= cuts.get(j).len();
                    } else {
                        break;
                    }
                }
                if (v) return a+" "+minB+" "+a+" "+lb;
                return minB+" "+a+" "+lb+" "+a;
            }
        }
        return null;
    }

    public C() throws Exception {
        int n = in.nextInt();
        int m = in.nextInt();
        int k = in.nextInt();
        List<Cut> verticals = new ArrayList<Cut>();
        List<Cut> horizontals = new ArrayList<Cut>();
        verticals.add(new Cut(0, 0, 0));
        horizontals.add(new Cut(0, 0, 0));
        verticals.add(new Cut(n, 0, 0));
        horizontals.add(new Cut(m, 0, 0));
        for (int i=0; i<k; i++) {
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();
            if (x1==x2) {
                verticals.add(new Cut(x1, y1, y2));
            } else {
                horizontals.add(new Cut(y1, x1, x2));
            }
        }
        verticals = normalize(verticals);
        horizontals = normalize(horizontals);
        // debug(verticals, horizontals);

        int v = grundy(n, m, verticals);
        int h = grundy(m, n, horizontals);
        int grundy = v ^ h;
        // debug(v, h, grundy);

        if (grundy==0) {
            System.out.println("SECOND");
        } else {
            System.out.println("FIRST");
            String ans = null;
            if (n>m) {
                if (ans==null) ans = solve(m, n, horizontals, grundy, false);
                if (ans==null) ans = solve(n, m, verticals, grundy, true);
            } else {
                if (ans==null) ans = solve(n, m, verticals, grundy, true);
                if (ans==null) ans = solve(m, n, horizontals, grundy, false);
            }
            System.out.println(ans);
        }
    }

    Scanner in = new Scanner(System.in);
    public static void main(String[] args) throws Exception { // {{{
        new C();
    } // }}}
    public static void debug(Object... arr) { // {{{
        System.err.println(Arrays.deepToString(arr));
    } // }}}
    public static class Scanner { // {{{
        BufferedReader br;
        String line;
        StringTokenizer st;
        public Scanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
        }
        public boolean hasNext() throws IOException {
            while ((st==null||!st.hasMoreTokens())&&(line=br.readLine())!=null)
                st = new StringTokenizer(line);
            return st.hasMoreTokens();
        }
        public String next() throws IOException {
            if (hasNext()) return st.nextToken();
            throw new NoSuchElementException();
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    } // }}}
}