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;
class EV {
 public:
  int x, y, i;
  EV() {}
  EV(int _x, int _y, int _i) {
    x = _x;
    y = _y;
    i = _i;
  }
  bool operator<(const EV& e) const {
    if (x == e.x) {
      if (y == e.y) return i < e.i;
      return y < e.y;
    }
    return x < e.x;
  }
};
EV X[300000];
EV Y[300000];
vector<int> b;
vector<int> bi;
vector<int> bj;
int main() {
  int n, m, r, i, j, k, x1, x2, y1, y2, xn, yn, d, px, s, xs, ys, fx, fy, XY, S;
  scanf("%d %d %d", &n, &m, &r);
  xn = yn = 0;
  for (i = 0; i < r; i++) {
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    if (x1 == x2) {
      if (y1 > y2) swap(y1, y2);
      X[xn++] = EV(x1, y1, 1);
      X[xn++] = EV(x1, y2, -1);
    } else {
      if (x1 > x2) swap(x1, x2);
      Y[yn++] = EV(y1, x1, 1);
      Y[yn++] = EV(y1, x2, -1);
    }
  }
  xs = n - 1;
  ys = m - 1;
  fx = 1;
  fy = 1;
  sort(X, X + xn);
  for (i = 1, j = 0; i <= xn; i++) {
    if (i == xn || X[i].x != X[i - 1].x) {
      bj.push_back(j);
      bi.push_back(i);
      xs--;
      if (X[i - 1].x == fx) fx++;
      d = 0;
      px = 0;
      s = 0;
      for (; j < i; j++) {
        if (!d) {
          s += X[j].y - px;
        }
        d += X[j].i;
        px = X[j].y;
      }
      s += m - px;
      b.push_back(s);
    }
  }
  XY = b.size();
  sort(Y, Y + yn);
  for (i = 1, j = 0; i <= yn; i++) {
    if (i == yn || Y[i].x != Y[i - 1].x) {
      bj.push_back(j);
      bi.push_back(i);
      ys--;
      if (Y[i - 1].y == fy) fy++;
      d = 0;
      px = 0;
      s = 0;
      for (; j < i; j++) {
        if (!d) {
          s += Y[j].y - px;
        }
        d += Y[j].i;
        px = Y[j].y;
      }
      s += n - px;
      b.push_back(s);
    }
  }
  s = 0;
  if (xs % 2) s ^= m;
  if (ys % 2) s ^= n;
  for (i = 0; i < b.size(); i++) {
    s ^= b[i];
  }
  if (s == 0) {
    puts("SECOND");
  } else {
    puts("FIRST");
    if (xs > 0 && m > (s ^ m)) {
      printf("%d %d %d %d\n", fx, 0, fx, m - (s ^ m));
    } else if (ys > 0 && n > (s ^ n)) {
      printf("%d %d %d %d\n", 0, fy, n - (s ^ n), fy);
    } else {
      for (i = 0; i < b.size(); i++) {
        if (b[i] > (s ^ b[i])) {
          S = b[i] - (s ^ b[i]);
          if (i < XY) {
            d = 0;
            px = 0;
            s = 0;
            for (j = bj[i]; j < bi[i]; j++) {
              if (!d) {
                s += X[j].y - px;
                if (s >= S) {
                  s -= X[j].y - px;
                  printf("%d %d %d %d\n", X[bj[i]].x, 0, X[bj[i]].x,
                         px + S - s);
                  return 0;
                }
              }
              d += X[j].i;
              px = X[j].y;
            }
            s += m - px;
            if (s >= S) {
              s -= m - px;
              printf("%d %d %d %d\n", X[bj[i]].x, 0, X[bj[i]].x, px + S - s);
              return 0;
            }
          } else {
            d = 0;
            px = 0;
            s = 0;
            for (j = bj[i]; j < bi[i]; j++) {
              if (!d) {
                s += Y[j].y - px;
                if (s >= S) {
                  s -= Y[j].y - px;
                  printf("%d %d %d %d\n", 0, Y[bj[i]].x, px + S - s,
                         Y[bj[i]].x);
                  return 0;
                }
              }
              d += Y[j].i;
              px = Y[j].y;
            }
            s += n - px;
            if (s >= S) {
              s -= n - px;
              printf("%d %d %d %d\n", 0, Y[bj[i]].x, px + S - s, Y[bj[i]].x);
              return 0;
            }
          }
        }
      }
    }
  }
  return 0;
}