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 A, typename B>
ostream& operator<<(ostream& out, const pair<A, B>& p) {
  out << "(" << p.first << "," << p.second << ") ";
  return out;
}
template <typename A, typename B>
void printP(const pair<A, B>& p, const char* str = NULL) {
  if (!(1 && !1)) return;
  if (str != NULL) cout << str << ":";
  cout << "(" << p.first << "," << p.second << ") ";
}
template <typename T>
void printV(const vector<T>& v, const char* str = NULL) {
  if (!(1 && !1)) return;
  if (str != NULL) cout << str << ": ";
  for (int i = 0; i < (v.size()); ++i) cout << v[i] << " ";
  cout << '\n';
}
template <typename T>
void printC(T& container, const char* str = NULL) {
  if (!(1 && !1)) return;
  if (str != NULL) cout << str << ":";
  for (__typeof((container).begin()) it = ((container).begin());
       it != (container).end(); ++it) {
    cout << (*it) << " ";
  }
  cout << '\n';
}
const int INF = 1000010111;
const int S_N = 152;
const int MOD = 1000000007;
int cntFree(vector<pair<int, int> >& v, int n, bool s = true) {
  if ((1 && !1)) printf("cntFree(v, %d)\n", n);
  printV(v, "V");
  int sum = 0;
  int last = 0;
  v.push_back(make_pair(n, n));
  if (s) sort((v).begin(), (v).end());
  for (__typeof((v).begin()) it = ((v).begin()); it != (v).end(); ++it) {
    if (it->first > last) sum += (it->first - last);
    last = max(last, it->second);
  }
  return sum;
}
int cut(vector<pair<int, int> >& v, int n, int need) {
  int sum = 0;
  int last = 0;
  v.push_back(make_pair(n, n));
  for (__typeof((v).begin()) it = ((v).begin()); it != (v).end(); ++it) {
    if (it->first > last) sum += (it->first - last);
    if (sum >= need) {
      last = it->first;
      break;
    } else
      last = max(last, it->second);
  }
  if (sum < need) return -1;
  last -= sum - need;
  return last;
}
int grundi(map<int, vector<pair<int, int> > >& M, vector<int>& C, int n,
           int def) {
  if ((1 && !1)) {
    cout << "grundi\nM: ";
    for (__typeof((M).begin()) it = ((M).begin()); it != (M).end(); ++it)
      cout << (it->first) << ", " << (it->second.size()) << " ";
    cout << '\n';
    cout << "C: ";
    for (__typeof((C).begin()) it = ((C).begin()); it != (C).end(); ++it)
      cout << (*it) << " ";
    cout << '\n';
    cout << "N: " << n << ", def: " << def << '\n';
  }
  int g = 0;
  if ((n - 1 - C.size()) % 2 == 1) g = def;
  if ((1 && !1)) {
    cout << "g = " << g << " Csize: " << C.size() << '\n';
  }
  for (__typeof((C).begin()) it = ((C).begin()); it != (C).end(); ++it) {
    int cnt = cntFree(M[*it], def);
    g = g ^ cnt;
    if ((1 && !1)) printf("\n\n\ncnt == %d, g = %d\n", cnt, g);
  }
  return g;
}
int mex(vector<int>& v, int start = 1) {
  for (__typeof((v).begin()) it = ((v).begin()); it != (v).end(); ++it) {
    if (*it != start) return start;
    start++;
  }
  return start;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  map<int, vector<pair<int, int> > > X, Y;
  vector<int> CX, CY;
  for (int _ = 0; _ < (k); ++_) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int nr, s, e;
    if (x1 == x2) {
      s = min(y1, y2), e = max(y1, y2);
      if (X[x1].empty()) CX.push_back(x1);
      X[x1].push_back(make_pair(s, e));
    } else {
      s = min(x1, x2), e = max(x1, x2);
      if (Y[y1].empty()) CY.push_back(y1);
      Y[y1].push_back(make_pair(s, e));
    }
  }
  int g = grundi(X, CX, n, m);
  g = g ^ grundi(Y, CY, m, n);
  if (g == 0) {
    cout << "SECOND" << '\n';
  } else {
    cout << "FIRST" << '\n';
    int nr = -1;
    int emp = mex(CX, 1);
    if (emp < n) CX.push_back(emp);
    emp = mex(CY, 1);
    if (emp < m) CY.push_back(emp);
    pair<int, int> p1, p2(-1, -1);
    for (int i = 0; i < CX.size() + CY.size(); i++) {
      bool iks = (i < CX.size());
      int p = iks ? CX[i] : CY[i - CX.size()];
      if ((1 && !1)) printf("i=%d, iks=%d, p=%d\n", i, (int)iks, p);
      int free = cntFree((iks ? X : Y)[p], iks ? m : n, false);
      int free2 = free ^ g;
      if ((1 && !1)) printf("free = %d, free ^ g = %d\n", free, free2);
      if (free2 <= free) {
        int last = cut((iks ? X : Y)[p], m, free - free2);
        if (iks) {
          p1 = make_pair(p, 0), p2 = make_pair(p, last);
        } else {
          p1 = make_pair(0, p), p2 = make_pair(last, p);
        }
        break;
      }
    }
    cout << p1.first << " " << p1.second << " " << p2.first << " " << p2.second
         << '\n';
  }
  if ((1 && !1)) {
    cout << g << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}