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 MAXN = 100007;
int n, m, k;
int a[MAXN][3], b[MAXN][3];
void Add(int a[][3], int x, int y1, int y2) {
  a[0][0]++;
  int t = a[0][0];
  if (y1 > y2) swap(y1, y2);
  y2--;
  a[t][0] = x;
  a[t][1] = y1;
  a[t][2] = y2;
}
int ans = 0;
map<int, int> r1, r2;
inline int cmp(const void *a, const void *b) {
  int t = ((int *)a)[0] - ((int *)b)[0];
  if (t != 0) return t;
  return ((int *)a)[1] - ((int *)b)[1];
}
int ma;
bool chk(int a[][3], int l, int r, int rl, int mid) {
  int l0 = ma - mid;
  for (int j = l; j <= r; j++) {
    int rr = a[j][2], ed2 = j;
    while (ed2 < r && a[ed2 + 1][1] <= rr + 1) {
      rr = max(rr, a[ed2 + 1][2]);
      ed2++;
    }
    int ll = a[j][1];
    if (ll < mid) ll = mid;
    if (rr - ll + 1 > 0) l0 -= rr - ll + 1;
    j = ed2;
  }
  return l0 >= rl;
}
int solve(int a[][3], int x, int rl) {
  for (int p = 1; p <= a[0][0]; p++) {
    if (a[p][0] == x) {
      int l, r;
      l = p;
      for (int i = p;; i++) {
        if (a[i][0] != x) {
          r = i - 1;
          break;
        }
      }
      int cl = 1, cr = max(n, m);
      while (cl < cr) {
        int mid = (cl + cr + 1) >> 1;
        if (chk(a, l, r, rl, mid))
          cl = mid;
        else
          cr = mid - 1;
      }
      return cl;
    }
  }
  return ma - rl;
}
void work() {
  qsort(a + 1, a[0][0], sizeof(a[0]), cmp);
  qsort(b + 1, b[0][0], sizeof(b[0]), cmp);
  for (int i = 1; i <= a[0][0]; i++) {
    int ed = i;
    while (ed < a[0][0] && a[ed + 1][0] == a[i][0]) ed++;
    int l0 = m;
    for (int j = i; j <= ed; j++) {
      int r = a[j][2], ed2 = j;
      while (ed2 < ed && a[ed2 + 1][1] <= r + 1) {
        r = max(r, a[ed2 + 1][2]);
        ed2++;
      }
      l0 -= r - a[j][1] + 1;
      j = ed2;
    }
    i = ed;
    r1[a[i][0]] = l0;
    ans ^= m ^ l0;
  }
  for (int i = 1; i <= b[0][0]; i++) {
    int ed = i;
    while (ed < b[0][0] && b[ed + 1][0] == b[i][0]) ed++;
    int l0 = n;
    for (int j = i; j <= ed; j++) {
      int r = b[j][2], ed2 = j;
      while (ed2 < ed && b[ed2 + 1][1] <= r + 1) {
        r = max(r, b[ed2 + 1][2]);
        ed2++;
      }
      l0 -= r - b[j][1] + 1;
      j = ed2;
    }
    i = ed;
    ans ^= n ^ l0;
    r2[b[i][0]] = l0;
  }
  if (ans == 0)
    printf("SECOND\n");
  else {
    printf("FIRST\n");
    for (int i = 1; i <= min(n - 1, k + 10); i++) {
      int rl = m;
      if (r1.count(i)) rl = r1[i];
      if ((ans ^ rl) < rl) {
        ma = m;
        cout << i << ' ' << 0 << ' ' << i << ' '
             << min(solve(a, i, (ans ^ rl)), m) << endl;
        exit(0);
      }
    }
    for (int i = 1; i <= min(m - 1, k + 10); i++) {
      int rl = n;
      if (r2.count(i)) rl = r2[i];
      if ((ans ^ rl) < rl) {
        ma = n;
        cout << 0 << ' ' << i << ' ' << min(solve(b, i, (ans ^ rl)), n) << ' '
             << i << endl;
        exit(0);
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= k; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 == x2)
      Add(a, x1, y1, y2);
    else
      Add(b, y1, x1, x2);
  }
  if (n % 2 == 0) ans ^= m;
  if (m % 2 == 0) ans ^= n;
  work();
  return 0;
}