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 SEG {
  int y, x1, x2;
  SEG() {}
  SEG(int _y, int _x1, int _x2) { y = _y, x1 = _x1, x2 = _x2; }
  bool operator<(const SEG &p) const {
    if (y < p.y) return true;
    if (y > p.y) return false;
    return x1 < p.x1;
  }
};
bool check(int x, int res) { return x >= (res ^ x); }
int len(int x, int res) { return x - (x ^ res); }
int calc(map<int, int> &Map, int n, int m) {
  int res = ((m - 1 - Map.size()) % 2) * n;
  for (map<int, int>::iterator it = Map.begin(); it != Map.end(); it++)
    res ^= n - it->second;
  return res;
}
bool write(int y, int x1, int x2, bool rev) {
  if (rev)
    printf("%d %d %d %d\n", y, x1, y, x2);
  else
    printf("%d %d %d %d\n", x1, y, x2, y);
}
bool output(int res, vector<SEG> &Seg, int n, int m, map<int, int> &Map,
            bool rev) {
  if (Map.size() < m - 1 && check(n, res)) {
    vector<int> has;
    has.push_back(0), has.push_back(m);
    for (map<int, int>::iterator it = Map.begin(); it != Map.end(); it++)
      has.push_back(it->first);
    sort(has.begin(), has.end());
    for (int i = 0; i + 1 < has.size(); i++)
      if (has[i] + 1 < has[i + 1]) {
        write(has[i] + 1, 0, len(n, res), rev);
        break;
      }
    return true;
  }
  int head = 0;
  while (head < Seg.size()) {
    int tail = head;
    while (tail + 1 < Seg.size() && Seg[tail + 1].y == Seg[head].y) tail++;
    if (check(n - Map[Seg[head].y], res)) {
      int need = len(n - Map[Seg[head].y], res), sum = 0, pos = 0;
      for (int i = head; i <= tail; i++) {
        sum += Seg[i].x1 - pos;
        if (sum >= need) {
          write(Seg[head].y, 0, Seg[i].x1 - sum + need, rev);
          return true;
        }
        pos = Seg[i].x2;
      }
      sum += n - pos;
      if (sum >= need) {
        write(Seg[head].y, 0, n - sum + need, rev);
        return true;
      }
      assert(false);
    }
    head = tail + 1;
  }
  return false;
}
int main() {
  vector<SEG> X, Y;
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= k; i++) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 > x2 || y1 > y2) swap(x1, x2), swap(y1, y2);
    if (y1 == y2)
      X.push_back(SEG(y1, x1, x2));
    else
      Y.push_back(SEG(x1, y1, y2));
  }
  sort(X.begin(), X.end());
  sort(Y.begin(), Y.end());
  vector<SEG> Xseg, Yseg;
  for (int i = 0; i < X.size(); i++)
    if (Xseg.size() == 0 || X[i].y != Xseg[Xseg.size() - 1].y ||
        X[i].x1 > Xseg[Xseg.size() - 1].x2)
      Xseg.push_back(X[i]);
    else
      Xseg[Xseg.size() - 1].x2 = max(Xseg[Xseg.size() - 1].x2, X[i].x2);
  for (int i = 0; i < Y.size(); i++)
    if (Yseg.size() == 0 || Y[i].y != Yseg[Yseg.size() - 1].y ||
        Y[i].x1 > Yseg[Yseg.size() - 1].x2)
      Yseg.push_back(Y[i]);
    else
      Yseg[Yseg.size() - 1].x2 = max(Yseg[Yseg.size() - 1].x2, Y[i].x2);
  map<int, int> Xmap, Ymap;
  for (int i = 0; i < Xseg.size(); i++)
    Xmap[Xseg[i].y] += Xseg[i].x2 - Xseg[i].x1;
  for (int i = 0; i < Yseg.size(); i++)
    Ymap[Yseg[i].y] += Yseg[i].x2 - Yseg[i].x1;
  int res = 0;
  res ^= calc(Xmap, n, m);
  res ^= calc(Ymap, m, n);
  if (res) {
    puts("FIRST");
    if (output(res, Xseg, n, m, Xmap, false)) return 0;
    if (output(res, Yseg, m, n, Ymap, true)) return 0;
    assert(false);
  } else
    puts("SECOND");
  return 0;
}