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;
map<int, int> mx, my;
vector<int> a;
int shx[100005], shy[100005];
vector<pair<int, int> > vx[100005], vy[100005];
int cntx, cnty, m, n;
void vertical(int x, int y1, int y2) {
  if (y1 > y2) swap(y1, y2);
  if (mx.find(x) == mx.end()) mx[x] = cntx++;
  shx[mx[x]] = x;
  vx[mx[x]].push_back(make_pair(y1, y2));
}
void horizontal(int y, int x1, int x2) {
  if (x1 > x2) swap(x1, x2);
  if (my.find(y) == my.end()) my[y] = cnty++;
  shy[my[y]] = y;
  vy[my[y]].push_back(make_pair(x1, x2));
}
void init() {
  for (int i = 0; i < (cntx); i++) {
    sort(vx[i].begin(), vx[i].end());
    int last = -1;
    int s = 0;
    for (int j = 0; j < (vx[i].size()); j++) {
      pair<int, int> P = vx[i][j];
      if (P.second > last) {
        if (P.first >= last)
          s += P.second - P.first;
        else
          s += P.second - last;
        last = P.second;
      }
    }
    a.push_back(m - s);
  }
  if ((n - 1 - cntx) % 2) {
    for (int i = (1); i <= (cntx + 1); i++)
      if (mx.find(i) == mx.end()) {
        mx[i] = cntx++;
        shx[mx[i]] = i;
        a.push_back(m);
        break;
      }
  }
  for (int i = 0; i < (cnty); i++) {
    sort(vy[i].begin(), vy[i].end());
    int last = -1;
    int s = 0;
    for (int j = 0; j < (vy[i].size()); j++) {
      pair<int, int> P = vy[i][j];
      if (P.second > last) {
        if (P.first >= last)
          s += P.second - P.first;
        else
          s += P.second - last;
        last = P.second;
      }
    }
    a.push_back(n - s);
  }
  if ((m - 1 - cnty) % 2) {
    for (int i = (1); i <= (cnty + 1); i++)
      if (my.find(i) == my.end()) {
        my[i] = cnty++;
        shy[my[i]] = i;
        a.push_back(n);
        break;
      }
  }
}
void print_x(int sh, int x) {
  int d = 0, c;
  int last = 0;
  vx[sh].push_back(make_pair(m, m));
  for (int i = 0; i < (vx[sh].size()); i++) {
    pair<int, int> P = vx[sh][i];
    if (P.first > last) {
      int len = P.first - last;
      if (len >= x) {
        c = last + x;
        cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
        return;
      }
      x -= len;
    }
    last = max(P.second, last);
  }
}
void print_y(int sh, int x) {
  int d = 0, c;
  int last = 0;
  vy[sh].push_back(make_pair(n, n));
  for (int i = 0; i < (vy[sh].size()); i++) {
    pair<int, int> P = vy[sh][i];
    if (P.first > last) {
      int len = P.first - last;
      if (len >= x) {
        c = last + x;
        cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
        return;
      }
      x -= len;
    }
    last = max(P.second, last);
  }
}
void process() {
  int g = 0;
  for (int i = 0; i < (a.size()); i++) {
    g ^= a[i];
  }
  if (g == 0)
    cout << "SECOND" << endl;
  else {
    cout << "FIRST" << endl;
    for (int i = 0; i < (a.size()); i++)
      if ((g ^ a[i]) < a[i]) {
        int x = g ^ a[i];
        if (i < cntx) {
          print_x(i, a[i] - x);
        } else
          print_y(i - cntx, a[i] - x);
        break;
      }
  }
}
int main() {
  int k;
  cin >> 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)
      vertical(x1, y1, y2);
    else
      horizontal(y1, x1, x2);
  }
  init();
  process();
  return 0;
}