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;
const int M = 100010;
const int mod = 1000000007;
const double eps = 1e-8;
const double Pi = 2 * acos(0.0);
int tailx = 0, taily = 0;
int n, m, k, a, b, c, d;
int lenx[M], leny[M];
bool visx[M], visy[M];
struct node {
  int no, l, r;
} xx[M], yy[M];
bool cmp(node a, node b) {
  if (a.no != b.no) return a.no < b.no;
  if (a.l != b.l) return a.l < b.l;
  return a.r > b.r;
}
void add(int x, int loc, int l, int r) {
  if (l > r) swap(l, r);
  if (x == 1) {
    xx[tailx].no = loc;
    if (loc < M) visx[loc] = 1;
    xx[tailx].l = l;
    xx[tailx++].r = r;
  } else {
    yy[taily].no = loc;
    if (loc < M) visy[loc] = 1;
    yy[taily].l = l;
    yy[taily++].r = r;
  }
}
int find(int ctl, int loc, int need) {
  node *t;
  int sum = 0;
  t = xx;
  if (ctl == 2) t = yy;
  for (int i = 0;; i++)
    if (t[i].no == loc) {
      int j = 0, l = 0, r = 0;
      while (1) {
        if (t[i + j].l - sum >= need || t[i + j].no != t[i].no)
          return sum + need;
        if (t[i + j].l > r) {
          l = t[i + j].l;
          r = t[i + j].r;
        } else
          r = max(r, t[i + j].r);
        sum += r - l;
        l = r;
        j++;
      }
    }
}
int main() {
  ios::sync_with_stdio(0);
  memset(visx, 0, sizeof(visx));
  memset(visy, 0, sizeof(visy));
  cin >> n >> m >> k;
  int ans = 0;
  if (n % 2 == 0) ans ^= m;
  if (m % 2 == 0) ans ^= n;
  while (k--) {
    cin >> a >> b >> c >> d;
    if (a == c)
      add(1, a, b, d);
    else
      add(2, b, a, c);
  }
  sort(xx, xx + tailx, cmp);
  sort(yy, yy + taily, cmp);
  for (int i = 0; i < tailx; i++) {
    if (!xx[i].no || xx[i].no == n) continue;
    if (!i || xx[i].no != xx[i - 1].no) {
      int t = m, j = 0, l = -1, r = -1;
      while (xx[i + j].no == xx[i].no && i + j < tailx) {
        if (xx[i + j].l > r) {
          t -= r - l;
          l = xx[i + j].l;
          r = xx[i + j].r;
        } else
          r = max(r, xx[i + j].r);
        j++;
      }
      t -= r - l;
      if (xx[i].no < M) lenx[xx[i].no] = t;
      ans = ans ^ m ^ t;
      i += j - 1;
    }
  }
  for (int i = 0; i < taily; i++) {
    if (!yy[i].no || yy[i].no == m) continue;
    if (!i || yy[i].no != yy[i - 1].no) {
      int t = n, j = 0, l = -1, r = -1;
      while (yy[i + j].no == yy[i].no && i + j < taily) {
        if (yy[i + j].l > r) {
          t -= r - l;
          l = yy[i + j].l;
          r = yy[i + j].r;
        } else
          r = max(r, yy[i + j].r);
        j++;
      }
      t -= r - l;
      if (yy[i].no < M) leny[yy[i].no] = t;
      ans = ans ^ n ^ t;
      i += j - 1;
    }
  }
  if (!ans)
    cout << "SECOND" << endl;
  else {
    cout << "FIRST" << endl;
    for (int i = 1; i < n && i < M; i++) {
      int tmp = m;
      if (visx[i]) tmp = lenx[i];
      if ((ans ^ tmp) <= tmp) {
        int need = tmp - (ans ^ tmp);
        if (tmp != m) need = find(1, i, need);
        cout << i << ' ' << 0 << ' ' << i << ' ' << need << endl;
        return 0;
      }
    }
    for (int i = 1; i < m && i < M; i++) {
      int tmp = n;
      if (visy[i]) tmp = leny[i];
      if ((ans ^ tmp) <= tmp) {
        int need = tmp - (ans ^ tmp);
        if (tmp != n) need = find(2, i, need);
        cout << 0 << ' ' << i << ' ' << need << ' ' << i << endl;
        return 0;
      }
    }
  }
  return 0;
}