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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n, m, k;
const int K = 100005;
struct cut {
  bool vert;
  int v;
  int b, e;
} cuts[K];
int ord[K];
bool cutsort(int x, int y) {
  if (cuts[x].vert != cuts[y].vert) return cuts[x].vert < cuts[y].vert;
  if (cuts[x].v != cuts[y].v) return cuts[x].v < cuts[y].v;
  if (cuts[x].b != cuts[y].b) return cuts[x].b < cuts[y].b;
  return cuts[x].e < cuts[y].e;
}
struct line {
  bool vert;
  int v;
  int nfree;
} lines[K];
void printans(bool vert, int v, int x) {
  printf("FIRST\n");
  if (vert) {
    printf("%d %d %d %d\n", v, 0, v, x);
  } else {
    printf("%d %d %d %d\n", 0, v, x, v);
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int ncuts = k;
  while (k-- > 0) {
    int xb, yb, xe, ye;
    scanf("%d%d%d%d", &xb, &yb, &xe, &ye);
    cuts[k].vert = xb == xe;
    if (xb != xe) {
      swap(xb, yb);
      swap(xe, ye);
    }
    assert(xb == xe);
    cuts[k].v = xb;
    if (yb > ye) swap(yb, ye);
    cuts[k].b = yb;
    cuts[k].e = ye;
    ord[k] = k;
  }
  sort(ord, ord + ncuts, cutsort);
  bool lastvert = false;
  int lastv = -1;
  int nfree = 0;
  int nto = -1;
  int myline = 0;
  for (int i = 0; i < ncuts; ++i) {
    cut &c = cuts[ord[i]];
    if (lastvert != c.vert || lastv != c.v) {
      if (i) {
        lines[myline].vert = lastvert;
        lines[myline].v = lastv;
        lines[myline].nfree = nfree;
        ++myline;
      }
      lastvert = c.vert;
      lastv = c.v;
      nfree = c.vert ? m : n;
      nto = 0;
    }
    if (c.b <= nto) {
      if (c.e > nto) {
        nfree -= c.e - nto;
        nto = c.e;
      }
    } else {
      nfree -= c.e - c.b;
      nto = c.e;
    }
  }
  if (ncuts) {
    lines[myline].vert = lastvert;
    lines[myline].v = lastv;
    lines[myline].nfree = nfree;
    ++myline;
  }
  int res = 0;
  if (!(n & 1)) res ^= m;
  if (!(m & 1)) res ^= n;
  for (int i = 0; i < myline; ++i) {
    if (lines[i].vert) {
      res ^= m;
    } else {
      res ^= n;
    }
    res ^= lines[i].nfree;
  }
  if (res) {
    int freehor = 1, freever = 1;
    for (int j = 0; j < myline; ++j) {
      if (lines[j].vert) {
        if (lines[j].v == freever) ++freever;
      } else {
        if (lines[j].v == freehor) ++freehor;
      }
      int nf = lines[j].nfree;
      int len = nf - (nf ^ res);
      if (len > 0) {
        int to = 0;
        for (int i = 0; i < ncuts; ++i) {
          cut &c = cuts[ord[i]];
          if (lines[j].vert != c.vert || lines[j].v != c.v) continue;
          if (c.b <= to)
            to = max(to, c.e);
          else {
            if (len <= c.b - to) {
              printans(lines[j].vert, lines[j].v, to + len);
              return 0;
            } else {
              len -= c.b - to;
              to = c.e;
            }
          }
        }
        printans(lines[j].vert, lines[j].v, to + len);
        return 0;
      }
    }
    if (freever < n) {
      int len = m - (m ^ res);
      if (len > 0) {
        printans(true, freever, len);
        return 0;
      }
    }
    if (freehor < m) {
      int len = n - (n ^ res);
      if (len > 0) {
        printans(false, freehor, len);
        return 0;
      }
    }
  }
  printf("SECOND\n");
  return 0;
}