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;
using ll = long long;
const ll llinf = (1ll << 61) - 1;
using SS = stringstream;
struct Dbg {
  static constexpr ostream &os = cout;
  template <class C>
  static auto dud(C *first) -> decltype(os << *first, 0);
  template <class C>
  static char dud(...);
  template <class C>
  typename enable_if<sizeof dud<C>(0) != 1, Dbg &>::type operator<<(
      const C &first) {
    os << first;
    return *this;
  }
  template <class C>
  Dbg &dump(C b, C e) {
    *this << "\n[";
    int cur = 0;
    for (C i = b; i != e and cur < 30; i++, cur++)
      *this << ", " + 2 * (i == b) << *i;
    return *this << "]";
  }
  template <class C>
  typename enable_if<sizeof dud<C>(0) == 1, Dbg &>::type operator<<(
      const C &first) {
    return dump(begin(first), end(first));
  }
  template <class C, size_t X>
  typename enable_if<sizeof(C) != 1, Dbg &>::type operator<<(C (&first)[X]) {
    return dump(begin(first), end(first));
  }
  template <class B, class C>
  Dbg &operator<<(const pair<B, C> &first) {
    return *this << "{" << first.first << ", " << first.second << "}";
  }
  Dbg &operator<<(ostream &(*first)(std::ostream &)) {
    os << first;
    return *this;
  }
} dbg;
void err(SS *ss) { delete ss; }
template <class C, class... A>
void err(SS *ss, const C &val, const A &...args) {
  string name;
  *ss >> name;
  if (name.back() == ',') name.pop_back();
  dbg << name << " = " << val << "; ", err(ss, args...);
}
const int inf = 1000000007, mxn = 100005;
int n, m, K, T, Q, cn;
vector<pair<int, pair<int, int>>> ver, hor;
vector<pair<int, int>> piles, piles2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.precision(11);
  cin >> n >> m >> K;
  for (auto i = 1; i <= K; i += 1) {
    int xb, xe, yb, ye;
    cin >> xb >> yb >> xe >> ye;
    if (xb > xe) swap(xb, xe);
    if (yb > ye) swap(yb, ye);
    if (yb == ye)
      ver.push_back({yb, {xb, xe}});
    else
      hor.push_back({xb, {yb, ye}});
  }
  sort(begin(ver), end(ver)), sort(begin(hor), end(hor));
  int os = m, last, prv = -1, nim = 0, hc = n - 1, vc = m - 1, pile = -inf,
      pile2 = -inf;
  for (auto &i : hor) {
    if (i.first == prv)
      os += max(0, i.second.second - max(last, i.second.first)),
          last = max(last, i.second.second);
    else {
      os = m - os, nim ^= os;
      if (prv > 0 and prv < n) piles.emplace_back(prv, os);
      if (i.first != prv + 1 and i.first > 1) pile = i.first - 1;
      hc--, os = i.second.second - i.second.first, last = i.second.second,
            prv = i.first;
    }
  }
  os = m - os, nim ^= os ^ ((hc & 1) * m);
  42;
  if (prv > 0 and prv < n) piles.emplace_back(prv, os);
  if (hc) {
    if (pile == -inf) pile = n - 1;
    piles.emplace_back(pile, m);
  }
  os = n, prv = -1;
  for (auto &i : ver) {
    if (i.first == prv)
      os += max(0, i.second.second - max(last, i.second.first)),
          last = max(last, i.second.second);
    else {
      os = n - os, nim ^= os;
      if (prv > 0 and prv < m) piles2.emplace_back(prv, os);
      if (i.first != prv + 1 and i.first > 1) pile2 = i.first - 1;
      vc--, os = i.second.second - i.second.first, last = i.second.second,
            prv = i.first;
    }
  }
  if (vc) {
    if (pile2 == -inf) pile2 = m - 1;
    piles2.emplace_back(pile2, n);
  }
  os = n - os, nim ^= os ^ ((vc & 1) * n);
  42;
  if (prv > 0 and prv < m) piles2.emplace_back(prv, os);
  if (!nim) return cout << "SECOND\n", 0;
  cout << "FIRST\n";
  42;
  for (auto &i : piles)
    if ((i.second ^ nim) < i.second) {
      int j = lower_bound(begin(hor), end(hor),
                          pair<int, pair<int, int>>(i.first, {-inf, -inf})) -
              hor.begin(),
          need = i.second - (i.second ^ nim);
      last = 0;
      for (; j < hor.size() and hor[j].first == i.first; j++) {
        need -= max(0, hor[j].second.first - last);
        42;
        if (need <= 0) {
          need += hor[j].second.first - last;
          break;
        }
        last = max(last, hor[j].second.second);
      }
      cout << i.first << ' ' << 0 << ' ' << i.first << ' ' << last + need
           << '\n',
          exit(0);
    }
  for (auto &i : piles2)
    if ((i.second ^ nim) < i.second) {
      int j = lower_bound(begin(ver), end(ver),
                          pair<int, pair<int, int>>(i.first, {-inf, -inf})) -
              ver.begin(),
          need = i.second - (i.second ^ nim);
      last = 0;
      for (; j < ver.size() and ver[j].first == i.first; j++) {
        need -= max(0, ver[j].second.first - last);
        if (need <= 0) {
          need += ver[j].second.first - last;
          break;
        }
        last = max(last, ver[j].second.second);
      }
      cout << 0 << ' ' << i.first << ' ' << last + need << ' ' << i.first
           << '\n',
          exit(0);
    }
}