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;
template <typename T>
int size(T &a) {
  return (int)a.size();
}
template <typename T>
T sqr(T a) {
  return a * a;
}
int getBit(int mask, int pos) { return ((mask >> pos) & 1); }
struct Segment {
  int xs, ys, xe, ye;
  Segment() {}
  Segment(int xs, int ys, int xe, int ye) : xs(xs), ys(ys), xe(xe), ye(ye) {
    norm();
  }
  bool operator<(const Segment &s) const {
    if (xs != s.xs) return xs < s.xs;
    if (ys != s.ys) return ys < s.ys;
    if (xe != s.xe) return xe < s.xe;
    return ye < s.ye;
  }
  void norm() {
    if (vert() && ys > ye) {
      swap(ys, ye);
    } else if (!vert() && xs > xe) {
      swap(xs, xe);
    }
  }
  bool vert() { return ys != ye; }
};
map<int, vector<Segment> > vert, hor;
int n, m, k;
int getFree(map<int, vector<Segment> > &m, int n) {
  int ret = 1;
  while (ret < n && size(m[ret]) > 0) ret++;
  if (ret >= n) ret = -1;
  return ret;
}
int getSize(vector<Segment> &v, int m) {
  sort(v.begin(), v.end());
  int ret = 0;
  int start = 0;
  for (int i = (0); i < (size(v)); ++i) {
    if (v[i].vert()) {
      ret += max(0, v[i].ys - start);
      start = max(start, v[i].ye);
    } else {
      ret += max(0, v[i].xs - start);
      start = max(start, v[i].xe);
    }
  }
  ret += max(0, m - start);
  return ret;
}
bool getMove(vector<Segment> &v, int m, int len, pair<int, int> &move) {
  int start = 0;
  for (int i = (0); i < (size(v)); ++i) {
    if (v[i].vert()) {
      int d = max(0, v[i].ys - start);
      if (d >= len) {
        start += len;
        len = 0;
        break;
      }
      len -= d;
      start = max(start, v[i].ye);
    } else {
      int d = max(0, v[i].xs - start);
      if (d >= len) {
        start += len;
        len = 0;
        break;
      }
      len -= d;
      start = max(start, v[i].xe);
    }
  }
  {
    int d = max(0, m - start);
    if (d >= len) {
      start += len;
    }
    len -= d;
  }
  if (len > 0) return false;
  move = make_pair(0, start);
  return true;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = (0); i < (k); ++i) {
    int xs, ys, xe, ye;
    scanf("%d %d %d %d", &xs, &ys, &xe, &ye);
    if (xs == xe) {
      vert[xs].push_back(Segment(xs, ys, xe, ye));
    } else {
      hor[ys].push_back(Segment(xs, ys, xe, ye));
    }
  }
  int sum = 0;
  if (((n - 1) - size(vert)) & 1) sum ^= m;
  if (((m - 1) - size(hor)) & 1) sum ^= n;
  for (map<int, vector<Segment> >::iterator it = vert.begin(); it != vert.end();
       it++) {
    sum ^= getSize(it->second, m);
  }
  for (map<int, vector<Segment> >::iterator it = hor.begin(); it != hor.end();
       it++) {
    sum ^= getSize(it->second, n);
  }
  if (sum) {
    puts("FIRST");
  } else {
    puts("SECOND");
    return 0;
  }
  int bitMove = 31;
  while (bitMove >= 0) {
    if (getBit(sum, bitMove)) break;
    bitMove--;
  }
  assert(bitMove >= 0);
  int freeX = getFree(vert, n);
  int freeY = getFree(hor, m);
  pair<int, int> move;
  bool ok = false;
  if (!ok) {
    int x = -1;
    if (freeX >= 0 && getBit(m, bitMove)) {
      ok = getMove(vert[freeX], m, m - (sum ^ m), move);
      assert(ok);
      x = freeX;
    } else {
      for (map<int, vector<Segment> >::iterator it = vert.begin();
           it != vert.end(); it++) {
        int sz = getSize(it->second, m);
        if (getBit(sz, bitMove)) {
          ok = getMove(it->second, m, sz - (sum ^ sz), move);
          assert(ok);
          x = it->first;
          break;
        }
      }
    }
    if (ok) {
      printf("%d %d %d %d\n", x, move.first, x, move.second);
    }
  }
  if (!ok) {
    int y = -1;
    if (freeY >= 0 && getBit(n, bitMove)) {
      ok = getMove(hor[freeY], n, n - (sum ^ n), move);
      assert(ok);
      y = freeY;
    } else {
      for (map<int, vector<Segment> >::iterator it = hor.begin();
           it != hor.end(); it++) {
        int sz = getSize(it->second, n);
        if (getBit(sz, bitMove)) {
          ok = getMove(it->second, n, sz - (sz ^ sum), move);
          assert(ok);
          y = it->first;
          break;
        }
      }
    }
    printf("%d %d %d %d\n", move.first, y, move.second, y);
  }
  return 0;
}