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 <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
template <class T>
T round_up(T a, T b) {
  return (a + b - 1) / b;
}
template <class T>
void uniq(T& c) {
  sort(c.begin(), c.end());
  c.erase(unique(c.begin(), c.end()), c.end());
}
template <class T>
string to_s(const T& a) {
  ostringstream os;
  os << a;
  return os.str();
}
template <class T>
T to_T(const string& s) {
  istringstream is(s);
  T res;
  is >> res;
  return res;
}
template <class T, class U>
ostream& operator<<(ostream& os, pair<T, U>& p) {
  os << "( " << p.first << ", " << p.second << " )";
  return os;
}
template <class T>
void print(T a, int n, const string& deli = " ", int br = 1) {
  for (int i = 0; i < n; ++i) {
    cout << a[i];
    if (i + 1 != n) cout << deli;
  }
  while (br--) cout << endl;
}
template <class T>
void print(const T& c, const string& deli = " ", int br = 1) {
  for (__typeof__((c).begin()) it = (c).begin(); it != (c).end(); ++it) {
    cout << *it;
    if (++it != c.end()) cout << deli;
    --it;
  }
  while (br--) cout << endl;
}
template <class T>
void print2d(T a, int w, int h, int width = -1, int br = 1) {
  for (int i = 0; i < h; ++i) {
    for (int j = 0; j < w; ++j) {
      if (width != -1) cout.width(width);
      cout << a[i][j] << ' ';
    }
    cout << endl;
  }
  while (br--) cout << endl;
}
template <class T>
void input(T& a, int n) {
  for (int i = 0; i < n; ++i) cin >> a[i];
}
template <class T>
void input(T* a, int n) {
  for (int i = 0; i < n; ++i) cin >> a[i];
}
void fix_pre(int n) {
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(10);
}
void fast_io() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
bool in_rect(int x, int y, int w, int h) {
  return 0 <= x && x < w && 0 <= y && y < h;
}
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const double PI = acos(-1.0);
template <typename T>
vector<pair<T, T> > cat_segments(vector<pair<T, T> > seg) {
  sort(seg.begin(), seg.end());
  vector<pair<T, T> > res;
  pair<T, T> cur = seg[0];
  for (int i = 1; i < seg.size(); ++i) {
    if (seg[i].first <= cur.second)
      cur.second = max(cur.second, seg[i].second);
    else {
      if (cur.first < cur.second) res.push_back(cur);
      cur = seg[i];
    }
  }
  if (cur.first < cur.second) res.push_back(cur);
  return res;
}
int find_end(vector<pair<int, int> >& seg, int del_len) {
  seg.push_back(pair<int, int>(((long long)(1e9)), 0));
  int cur_len = 0, prev_end = 0;
  for (int i = 0; i < (int)(seg.size()); ++i) {
    int space = seg[i].first - prev_end;
    if (cur_len + space >= del_len) return prev_end + (del_len - cur_len);
    cur_len += space;
    prev_end = seg[i].second;
  }
  assert("precondition: there is solution" && false);
}
int main() {
  int w, h, cuts;
  scanf("%d%d%d", &w, &h, &cuts);
  map<int, vector<pair<int, int> > > row, col;
  while (cuts--) {
    int xb, yb, xe, ye;
    scanf("%d%d%d%d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      if (yb > ye) swap(yb, ye);
      col[xb].push_back(pair<int, int>(yb, ye));
    } else {
      if (xb > xe) swap(xb, xe);
      row[yb].push_back(pair<int, int>(xb, xe));
    }
  }
  int clear_row = (h - 1) - row.size();
  int clear_col = (w - 1) - col.size();
  int nim = 0;
  if (clear_row & 1) nim ^= w;
  if (clear_col & 1) nim ^= h;
  for (__typeof__((row).begin()) it = (row).begin(); it != (row).end(); ++it) {
    vector<pair<int, int> > seg = cat_segments(it->second);
    int rem_len = w;
    for (int i = 0; i < (int)(seg.size()); ++i)
      rem_len -= seg[i].second - seg[i].first;
    nim ^= rem_len;
  }
  for (__typeof__((col).begin()) it = (col).begin(); it != (col).end(); ++it) {
    vector<pair<int, int> > seg = cat_segments(it->second);
    int rem_len = h;
    for (int i = 0; i < (int)(seg.size()); ++i)
      rem_len -= seg[i].second - seg[i].first;
    nim ^= rem_len;
  }
  if (nim) {
    puts("FIRST");
    if (clear_row > 0 && (nim ^ w) < w) {
      int y = 1;
      while (row.count(y)) ++y;
      printf("%d %d %d %d\n", 0, y, w - (nim ^ w), y);
      return 0;
    }
    for (__typeof__((row).begin()) it = (row).begin(); it != (row).end();
         ++it) {
      vector<pair<int, int> > seg = cat_segments(it->second);
      int rem_len = w;
      for (int i = 0; i < (int)(seg.size()); ++i)
        rem_len -= seg[i].second - seg[i].first;
      if ((nim ^ rem_len) < rem_len) {
        int y = it->first;
        printf("%d %d %d %d\n", 0, y, find_end(seg, rem_len - (nim ^ rem_len)),
               y);
        return 0;
      }
    }
    if (clear_col > 0 && (nim ^ h) < h) {
      int x = 1;
      while (col.count(x)) ++x;
      printf("%d %d %d %d\n", x, 0, x, h - (nim ^ h));
      return 0;
    }
    for (__typeof__((col).begin()) it = (col).begin(); it != (col).end();
         ++it) {
      vector<pair<int, int> > seg = cat_segments(it->second);
      int rem_len = h;
      for (int i = 0; i < (int)(seg.size()); ++i)
        rem_len -= seg[i].second - seg[i].first;
      if ((nim ^ rem_len) < rem_len) {
        int x = it->first;
        printf("%d %d %d %d\n", x, 0, x,
               find_end(seg, rem_len - (nim ^ rem_len)));
        return 0;
      }
    }
    assert("nanzosore" && false);
  } else
    puts("SECOND");
}