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;
vector<pair<int, int> > union_VPI(vector<pair<int, int> > a, int &sz) {
  sz = 0;
  if (a.size()) {
    vector<pair<int, int> > res;
    sort(a.begin(), a.end());
    int st = a[0].first, ed = a[0].second;
    for (int i = (1); i < (a.size()); i++) {
      int nst = a[i].first, ned = a[i].second;
      if (ed < nst) {
        res.push_back(pair<int, int>(st, ed));
        sz += ed - st;
        st = nst, ed = ned;
      } else
        ed = max(ed, ned);
    }
    res.push_back(pair<int, int>(st, ed));
    sz += ed - st;
    return res;
  } else
    return vector<pair<int, int> >();
}
int get_coord(vector<pair<int, int> > a, int sz, int ub) {
  int curr_pos = 0;
  a.push_back(pair<int, int>(ub, ub));
  for (int i = (0); i < (a.size()); i++) {
    int st = a[i].first;
    int ed = a[i].second;
    if (curr_pos + sz <= st) {
      curr_pos += sz;
      sz = 0;
      break;
    } else {
      sz -= st - curr_pos;
      curr_pos = ed;
    }
  }
  assert(sz == 0);
  return curr_pos;
}
int n, m, k;
map<int, vector<pair<int, int> > > seg_x;
vector<int> x_val, x_nim;
map<int, vector<pair<int, int> > > seg_y;
vector<int> y_val, y_nim;
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = (0); i < (k); i++) {
    int xb, yb, xe, ye;
    scanf("%d %d %d %d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      if (yb > ye) swap(yb, ye);
      seg_x[xb].push_back(pair<int, int>(yb, ye));
    } else if (yb == ye) {
      if (xb > xe) swap(xb, xe);
      seg_y[yb].push_back(pair<int, int>(xb, xe));
    } else
      assert(0);
  }
  for (map<int, vector<pair<int, int> > >::iterator it = seg_x.begin();
       it != seg_x.end(); it++)
    x_val.push_back(it->first);
  for (map<int, vector<pair<int, int> > >::iterator it = seg_y.begin();
       it != seg_y.end(); it++)
    y_val.push_back(it->first);
  x_nim.resize(x_val.size());
  y_nim.resize(y_val.size());
  int x_rem = n - 1 - x_val.size();
  int y_rem = m - 1 - y_val.size();
  int xor_val = (((x_rem % 2) ? m : 0) ^ ((y_rem % 2) ? n : 0));
  int sz;
  for (int i = (0); i < (x_val.size()); i++) {
    vector<pair<int, int> > &curr = seg_x[x_val[i]];
    curr = union_VPI(curr, sz);
    x_nim[i] = m - sz;
    xor_val ^= x_nim[i];
  }
  for (int i = (0); i < (y_val.size()); i++) {
    vector<pair<int, int> > &curr = seg_y[y_val[i]];
    curr = union_VPI(curr, sz);
    y_nim[i] = n - sz;
    xor_val ^= y_nim[i];
  }
  if (xor_val) {
    printf("FIRST\n");
    for (int i = (0); i < (x_val.size()); i++)
      if (x_nim[i] && __builtin_clz(x_nim[i]) == __builtin_clz(xor_val)) {
        int sz = xor_val ^ x_nim[i];
        int x = x_val[i];
        printf("%d %d %d %d\n", x, get_coord(seg_x[x], sz, m), x, m);
        return 0;
      }
    for (int i = (0); i < (y_val.size()); i++)
      if (y_nim[i] && __builtin_clz(y_nim[i]) == __builtin_clz(xor_val)) {
        int sz = xor_val ^ y_nim[i];
        int y = y_val[i];
        printf("%d %d %d %d\n", get_coord(seg_y[y], sz, n), y, n, y);
        return 0;
      }
    if (x_rem && __builtin_clz(m) == __builtin_clz(xor_val)) {
      int x = 1;
      while (seg_x.count(x)) x++;
      assert(x < n);
      printf("%d %d %d %d\n", x, (xor_val ^ m), x, m);
      return 0;
    }
    if (y_rem && __builtin_clz(n) == __builtin_clz(xor_val)) {
      int y = 1;
      while (seg_y.count(y)) y++;
      assert(y < m);
      printf("%d %d %d %d\n", (xor_val ^ n), y, n, y);
      return 0;
    }
    assert(0);
  } else
    printf("SECOND\n");
  return 0;
}