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;
struct aa {
  int x1, y1, x2, y2;
} a[100010], b[100010];
struct aaa {
  int len, x1, x2, y1, y2;
} ans[500000];
int sum = 0;
int sta, cnt;
int n, m, tot;
int cmp1(aa x, aa y) {
  if (x.x1 != y.x1) return x.x1 < y.x1;
  return x.y1 < y.y1;
}
int cmp2(aa x, aa y) {
  if (x.y1 != y.y1) return x.y1 < y.y1;
  return x.x1 < y.x1;
}
void updata(int len, int x1, int x2, int y1, int y2) {
  if (len > 0) {
    if (sum >= 500000)
      while (1)
        ;
    ans[sum].len = len;
    ans[sum].x1 = x1;
    ans[sum].x2 = x2;
    ans[sum].y1 = y1;
    ans[sum].y2 = y2;
    sum++;
  }
}
void solve() {
  int i, t, j, len;
  sta = t = 0;
  for (i = 0; i < sum; i++) {
    if (ans[i].x1 == ans[i].x2) {
      t += ans[i].len;
      if (i == sum - 1 ||
          (i < sum - 1 && ans[i + 1].x1 == ans[i + 1].x2 &&
           ans[i + 1].x1 > ans[i].x1) ||
          (i < sum - 1 && ans[i + 1].y1 == ans[i + 1].y2)) {
        sta = sta ^ t;
        t = 0;
      }
    } else {
      t += ans[i].len;
      if (i == sum - 1 || (i < sum - 1 && ans[i + 1].y1 > ans[i].y1)) {
        sta = sta ^ t;
        t = 0;
      }
    }
  }
  if (sta == 0) {
    printf("SECOND\n");
    return;
  }
  printf("FIRST\n");
  for (i = 0; i < sum; i++) {
    if (ans[i].x1 == ans[i].x2) {
      t += ans[i].len;
      if (i == sum - 1 ||
          (i < sum - 1 && ans[i + 1].x1 == ans[i + 1].x2 &&
           ans[i + 1].x1 > ans[i].x1) ||
          (i < sum - 1 && ans[i + 1].y1 == ans[i + 1].y2)) {
        len = t - (sta ^ t);
        if (len > 0) {
          for (j = i;; j--) {
            t -= ans[j].len;
            if (t < len) break;
          }
          printf("%d %d %d %d\n", ans[i].x1, 0, ans[i].x1, ans[j].y1 + len - t);
          return;
        }
        t = 0;
      }
    } else {
      t += ans[i].len;
      if (i == sum - 1 || (i < sum - 1 && ans[i + 1].y1 > ans[i].y1)) {
        len = t - (sta ^ t);
        if (len > 0) {
          for (j = i;; j--) {
            t -= ans[j].len;
            if (t < len) break;
          }
          printf("%d %d %d %d\n", 0, ans[i].y1, ans[j].x1 + len - t, ans[i].y1);
          return;
        }
        t = 0;
      }
    }
  }
}
int main() {
  int i, len, tx, ty;
  scanf("%d%d%d", &n, &m, &tot);
  for (i = 0; i < tot; i++) {
    scanf("%d%d%d%d", &a[i].x1, &a[i].y1, &a[i].x2, &a[i].y2);
  }
  b[0].x1 = b[0].x2 = 0;
  b[0].y1 = 0;
  b[0].y2 = m;
  cnt = 1;
  for (i = 0; i < tot; i++) {
    if (a[i].x1 == a[i].x2) {
      b[cnt] = a[i];
      if (b[cnt].y1 > b[cnt].y2) swap(b[cnt].y1, b[cnt].y2);
      cnt++;
    }
  }
  b[cnt].x1 = b[cnt].x2 = n;
  b[cnt].y1 = 0;
  b[cnt].y2 = m;
  cnt++;
  sta = 0;
  sort(b, b + cnt, cmp1);
  tx = 0;
  ty = m;
  for (i = 1; i < cnt; i++) {
    if (b[i].x1 != b[i - 1].x1) {
      len = m - ty;
      updata(len, b[i - 1].x1, b[i - 1].x1, ty, m);
      if (b[i].x1 - b[i - 1].x1 > 1) {
        if ((b[i].x1 - b[i - 1].x1 - 1) % 2 == 1)
          updata(m, b[i].x1 - 1, b[i].x1 - 1, 0, m);
      }
      len = b[i].y1;
      updata(len, b[i].x1, b[i].x1, 0, b[i].y1);
      ty = b[i].y2;
    } else {
      len = b[i].y1 - ty;
      if (len > 0) {
        updata(len, b[i].x1, b[i].x1, ty, b[i].y1);
      }
      ty = max(ty, b[i].y2);
    }
  }
  b[0].y1 = b[0].y1 = 0;
  b[0].x1 = 0;
  b[0].x2 = n;
  cnt = 1;
  for (i = 0; i < tot; i++) {
    if (a[i].y1 == a[i].y2) {
      b[cnt] = a[i];
      if (b[cnt].x1 > b[cnt].x2) swap(b[cnt].x1, b[cnt].x2);
      cnt++;
    }
  }
  b[cnt].y1 = b[cnt].y2 = m;
  b[cnt].x1 = 0;
  b[cnt].x2 = n;
  cnt++;
  sort(b, b + cnt, cmp2);
  tx = n;
  for (i = 1; i < cnt; i++) {
    if (b[i].y1 != b[i - 1].y1) {
      len = n - tx;
      updata(len, tx, n, b[i - 1].y1, b[i - 1].y1);
      if (b[i].y1 - b[i - 1].y1 > 1) {
        if ((b[i].y1 - b[i - 1].y1 - 1) % 2 == 1) {
          updata(n, 0, n, b[i].y1 - 1, b[i].y1 - 1);
        }
      }
      len = b[i].x1;
      updata(len, 0, b[i].x1, b[i].y1, b[i].y2);
      tx = b[i].x2;
    } else {
      len = b[i].x1 - tx;
      if (len > 0) {
        updata(len, tx, b[i].x1, b[i].y1, b[i].y1);
      }
      tx = max(b[i].x2, tx);
    }
  }
  solve();
  return 0;
}