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 N = 1e5 + 7;
int n, m, k;
struct Node {
  int x, l, r;
  Node() {}
  Node(int _x, int _l, int _r) { x = _x, l = _l, r = _r; }
  bool operator<(const Node &p) const {
    if (x != p.x) return x < p.x;
    if (l != p.l) return l < p.l;
    return r < p.r;
  }
  void out() { printf("x = %d, l = %d, r = %d\n", x, l, r); }
};
vector<Node> X, Y;
void gao(vector<Node> &vec, int L, int &sg) {
  sort(vec.begin(), vec.end());
  for (int i = 0, j; i < ((int)(vec).size()); i = j) {
    j = i + 1;
    while (j < ((int)(vec).size()) && vec[j].x == vec[i].x) ++j;
    int cnt = 0, l = 0, r = 0;
    for (int k = (i); k < (j); ++k)
      if (vec[k].l <= r) {
        r = max(r, vec[k].r);
      } else {
        cnt += r - l;
        l = vec[k].l, r = vec[k].r;
      }
    cnt += r - l;
    sg ^= L ^ (L - cnt);
  }
}
Node move(vector<Node> &vec, int X, int L, int sg) {
  set<int> S;
  for (int i = 0, j; i < ((int)(vec).size()); i = j) {
    j = i + 1;
    while (j < ((int)(vec).size()) && vec[j].x == vec[i].x) ++j;
    int cnt = 0, l = 0, r = 0;
    for (int k = (i); k < (j); ++k)
      if (vec[k].l <= r) {
        r = max(r, vec[k].r);
      } else {
        cnt += r - l;
        l = vec[k].l, r = vec[k].r;
      }
    cnt += r - l, S.insert(vec[i].x);
    if ((sg ^ (L - cnt)) <= L - cnt) {
      sg ^= L - cnt;
      if (sg <= vec[i].l) return Node(vec[i].x, sg, L);
      sg -= vec[i].l, l = vec[i].l, r = vec[i].r;
      for (int k = (i); k < (j); ++k)
        if (vec[k].l <= r) {
          r = max(r, vec[k].r);
        } else {
          if (sg <= vec[k].l - r) return Node(vec[i].x, r + sg, L);
          sg -= vec[k].l - r;
          l = vec[k].l, r = vec[k].r;
        }
      return Node(vec[i].x, r + sg, L);
    }
  }
  for (int x = (1); x < (X); ++x)
    if (S.find(x) == S.end()) {
      if ((sg ^ L) <= L) return Node(x, sg ^ L, L);
      break;
    }
  return Node(-1, -1, -1);
}
int solve() {
  int sg = 0;
  if (!(n & 1)) sg ^= m;
  if (!(m & 1)) sg ^= n;
  gao(X, m, sg), gao(Y, n, sg);
  return sg;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = (0); i < (k); ++i) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 == x2) {
      X.push_back(Node(x1, min(y1, y2), max(y1, y2)));
    } else {
      Y.push_back(Node(y1, min(x1, x2), max(x1, x2)));
    }
  }
  int sg = solve();
  if (sg) {
    puts("FIRST");
    Node ans = move(X, n, m, sg);
    if (~ans.x) {
      printf("%d %d %d %d", ans.x, ans.l, ans.x, ans.r);
    } else {
      ans = move(Y, m, n, sg);
      printf("%d %d %d %d", ans.l, ans.x, ans.r, ans.x);
    }
  } else {
    puts("SECOND");
  }
  return 0;
}