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 linie {
  int x1, y1, x2, y2;
};
const int N = 110000;
int n, m, k, px, py;
linie lx[N], ly[N];
vector<int> gr;
bool cmp(linie a, linie b) {
  if (a.x1 == b.x1) {
    return a.y1 < b.y1;
  }
  return a.x1 < b.x1;
}
void calc(linie x[], int px, int size, int elad, bool veee) {
  int i, j, nr = 0, last, freex = 1, lastx = 0;
  linie temp;
  for (i = 1; i <= px; ++i) {
    if (x[i].x1 - lastx > 1) freex = x[i].x1 - 1;
    lastx = x[i].x1;
    for (j = i + 1; j <= px && x[i].x1 == x[j].x1; ++j)
      ;
    --j;
    last = 0;
    int sum = 0;
    for (int k = i; k <= j; ++k) {
      if (x[k].y1 - last > 0) {
        sum += x[k].y1 - last;
      }
      last = max(last, x[k].y2);
    }
    if (elad - last) {
      sum += elad - last;
    }
    gr.push_back(sum);
    i = j;
    ++nr;
  }
  if (size - lastx > 1) freex = size - 1;
  if ((size - 1 - nr) & 1) gr.push_back(elad);
}
int endprog = 0;
void del(linie x[], int px, int size, int elad, bool veee, int nrd, int gri) {
  int i, j, nr = 0, last, freex = 1, lastx = 0;
  linie temp;
  for (i = 1; i <= px; ++i) {
    if (x[i].x1 - lastx > 1) freex = x[i].x1 - 1;
    lastx = x[i].x1;
    for (j = i + 1; j <= px && x[i].x1 == x[j].x1; ++j)
      ;
    --j;
    last = 0;
    int sum = 0;
    for (int k = i; k <= j; ++k) {
      if (x[k].y1 - last > 0) {
        sum += x[k].y1 - last;
      }
      last = max(last, x[k].y2);
    }
    if (elad - last) {
      sum += elad - last;
    }
    if (sum == gri) {
      sum = 0;
      last = 0;
      endprog = 1;
      for (int k = i; k <= j; ++k) {
        if (x[k].y1 - last > 0) {
          sum += x[k].y1 - last;
          if (sum >= nrd) {
            if (veee) {
              cout << "0 " << x[i].x1 << " " << x[k].y1 - (sum - nrd) << " "
                   << x[i].x1;
            } else
              cout << x[i].x1 << " 0 " << x[i].x1 << " "
                   << x[k].y1 - (sum - nrd);
            return;
          }
        }
        last = max(last, x[k].y2);
      }
      if (elad - last) {
        sum += elad - last;
      }
      if (veee) {
        cout << "0 " << x[i].x1 << " " << elad - (sum - nrd) << " " << x[i].x1;
      } else
        cout << x[i].x1 << " 0 " << x[i].x1 << " " << elad - (sum - nrd);
      return;
    }
    i = j;
    ++nr;
  }
  if (size - lastx > 1) freex = size - 1;
  if ((size - 1 - nr) & 1) {
    if (elad == gri) {
      endprog = 1;
      if (veee) {
        cout << "0 " << freex << " " << nrd << " " << freex;
      } else
        cout << freex << " 0 " << freex << " " << nrd;
    }
  }
}
int main() {
  int i;
  cin >> n >> m >> k;
  for (i = 1; i <= k; ++i) {
    linie a;
    cin >> a.x1 >> a.y1 >> a.x2 >> a.y2;
    if (a.x1 == a.x2) {
      if (a.y1 > a.y2) swap(a.y1, a.y2);
      lx[++px] = a;
    } else {
      if (a.x1 > a.x2) swap(a.x1, a.x2);
      swap(a.x1, a.y1);
      swap(a.x2, a.y2);
      ly[++py] = a;
    }
  }
  sort(lx + 1, lx + px + 1, cmp);
  sort(ly + 1, ly + py + 1, cmp);
  calc(lx, px, n, m, 0);
  calc(ly, py, m, n, 1);
  int so = 0;
  for (i = 0; i < gr.size(); ++i) so ^= gr[i];
  int lb = 0;
  for (int lastb = 0; lastb <= 30; ++lastb)
    if (so & (1 << lastb)) lb = lastb;
  if (!so)
    cout << "SECOND";
  else {
    cout << "FIRST\n";
    for (i = 0; i < gr.size(); ++i)
      if (gr[i] & (1 << lb)) {
        del(lx, px, n, m, 0, gr[i] - (so ^ gr[i]), gr[i]);
        if (endprog) return 0;
        del(ly, py, m, n, 1, gr[i] - (so ^ gr[i]), gr[i]);
        break;
      }
  }
  return 0;
}