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;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = 3.1415926535897932384626433832795;
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T abs(T x) {
  return x < 0 ? -x : x;
}
struct side {
  vector<pair<int, pair<int, int> > > have;
  vector<pair<int, int> > res;
  vector<pair<int, vector<pair<int, int> > > > e;
  int n, len;
  bool rv;
  void add(int x, int l, int r) {
    if (l > r) swap(l, r);
    have.push_back(make_pair(x, make_pair(l, r)));
  }
  void check(vector<pair<int, int> > &e, int x, int ll, int rs) {
    if ((ll ^ rs) > ll) return;
    int w = (ll ^ rs);
    int st = 0;
    int fin = 0;
    int now = 0;
    for (int i = 0; i < (int)(e.size()); i++) {
      if (e[i].second - e[i].first + now < w) {
        now += e[i].second - e[i].first;
        continue;
      }
      fin = e[i].first + w - now;
      puts("FIRST");
      if (rv) {
        printf("%d %d %d %d", x, fin, x, len);
      } else {
        printf("%d %d %d %d", fin, x, len, x);
      }
      exit(0);
    }
    exit(1);
  }
  void find(int rs) {
    int cnt = n - res.size();
    if (cnt > 0) {
      int w = 1, pos = 0;
      while (pos < res.size() && res[pos].first == w) {
        pos++;
        w++;
      }
      vector<pair<int, int> > q;
      q.push_back(make_pair(0, len));
      check(q, w, len, rs);
    }
    for (int i = 0; i < (int)(e.size()); i++) {
      check(e[i].second, res[i].first, res[i].second, rs);
    }
  }
  void recalc() {
    sort(have.begin(), have.end());
    for (int i = 0; i < (int)(have.size()); i++) {
      int now = have[i].second.first, pos = have[i].second.second;
      int j = i + 1;
      vector<pair<int, int> > e1;
      e1.push_back(make_pair(0, have[i].second.first));
      while (j < have.size() && have[j].first == have[i].first) {
        int w = have[j].second.first;
        if (w <= pos) {
          pos = max(pos, have[j].second.second);
        } else {
          now += w - pos;
          e1.push_back(make_pair(pos, w));
          pos = have[j].second.second;
        }
        j++;
      }
      now += len - pos;
      e1.push_back(make_pair(pos, len));
      e.push_back(make_pair(have[i].first, e1));
      res.push_back(make_pair(have[i].first, now));
      i = j - 1;
    }
  }
  int getNim() {
    int nim = 0;
    int cnt = n - res.size();
    if (cnt & 1) nim ^= len;
    for (int i = 0; i < (int)(res.size()); i++) nim ^= res[i].second;
    return nim;
  }
};
side a, b;
int n, m, k;
int main() {
  cin >> n >> m >> k;
  a.n = n - 1;
  a.len = m;
  a.rv = 1;
  b.n = m - 1;
  b.len = n;
  b.rv = 0;
  for (int i = 0; i < (int)(k); i++) {
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    if (x1 == x2)
      a.add(x1, y1, y2);
    else
      b.add(y1, x1, x2);
  }
  a.recalc();
  b.recalc();
  int res = a.getNim() ^ b.getNim();
  cerr << res << endl;
  if (res == 0) {
    puts("SECOND");
    exit(0);
  }
  a.find(res);
  b.find(res);
  puts("SECOND");
  return 0;
}