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 double pi = 3.14159265358979323846264338327950288419716939937511;
const double eps = 1e-9;
char ch_ch_ch[1 << 20];
string gs() {
  scanf("%s", ch_ch_ch);
  return string(ch_ch_ch);
}
string gl() {
  gets(ch_ch_ch);
  return string(ch_ch_ch);
}
inline int gi() {
  int x;
  scanf("%d", &x);
  return x;
}
const int inf = 1000000000;
int n, m, k;
vector<pair<pair<int, int>, pair<int, int> > > hor;
vector<pair<pair<int, int>, pair<int, int> > > vert;
bool comphor(const pair<pair<int, int>, pair<int, int> > &a,
             const pair<pair<int, int>, pair<int, int> > &b) {
  return a < b;
}
bool compvert(pair<pair<int, int>, pair<int, int> > a,
              pair<pair<int, int>, pair<int, int> > b) {
  swap(a.first.first, a.first.second);
  swap(a.second.first, a.second.second);
  swap(b.first.first, b.first.second);
  swap(b.second.first, b.second.second);
  return a < b;
}
vector<int> nims;
vector<int> coord;
vector<int> isHor;
vector<pair<int, int> > argum;
void addNim(int c, int horiz, int val) {
  nims.push_back(val);
  coord.push_back(c);
  isHor.push_back(horiz);
}
void workhor(int x) {
  sort(argum.begin(), argum.end());
  int l = 0, r = 0;
  int cnt = 0;
  for (int i = 0; i < (argum.size()); ++i) {
    if (argum[i].first > r) {
      cnt += argum[i].first - r;
      l = argum[i].first;
      r = argum[i].second;
    } else {
      r = max(r, argum[i].second);
    }
  }
  if (r < m) cnt += m - r;
  addNim(x, 1, cnt);
}
void workvert(int y) {
  sort(argum.begin(), argum.end());
  int l = 0, r = 0;
  int cnt = 0;
  for (int i = 0; i < (argum.size()); ++i) {
    if (argum[i].first > r) {
      cnt += argum[i].first - r;
      l = argum[i].first;
      r = argum[i].second;
    } else {
      r = max(r, argum[i].second);
    }
  }
  if (r < n) cnt += n - r;
  addNim(y, 0, cnt);
}
set<int> wasX;
set<int> wasY;
void cutFrom(int ind, int len) {
  if (isHor[ind]) {
    argum.clear();
    for (int i = 0; i < (hor.size()); ++i)
      if (hor[i].first.first == coord[ind])
        argum.push_back(make_pair(hor[i].first.second, hor[i].second.second));
    int r = 0;
    int cnt = 0;
    for (int i = 0; i < (argum.size()); ++i) {
      if (argum[i].first > r) {
        cnt += argum[i].first - r;
        r = argum[i].first;
        if (cnt >= len) {
          r -= (cnt - len);
          break;
        }
        r = argum[i].second;
      } else {
        r = max(r, argum[i].second);
      }
    }
    if (cnt < len) {
      cnt += m - r;
      r = m;
      if (cnt >= len) {
        r -= (cnt - len);
      }
    }
    printf("%d %d %d %d\n", coord[ind], 0, coord[ind], r);
  } else {
    argum.clear();
    for (int i = 0; i < (vert.size()); ++i)
      if (vert[i].first.second == coord[ind])
        argum.push_back(make_pair(vert[i].first.first, vert[i].second.first));
    int r = 0;
    int cnt = 0;
    for (int i = 0; i < (argum.size()); ++i) {
      if (argum[i].first > r) {
        cnt += argum[i].first - r;
        r = argum[i].first;
        if (cnt >= len) {
          r -= (cnt - len);
          break;
        }
        r = argum[i].second;
      } else {
        r = max(r, argum[i].second);
      }
    }
    if (cnt < len) {
      cnt += n - r;
      r = n;
      if (cnt >= len) {
        r -= (cnt - len);
      }
    }
    printf("%d %d %d %d\n", 0, coord[ind], r, coord[ind]);
  }
}
void solution() {
  cin >> n >> m >> k;
  for (int i = 0; i < (k); ++i) {
    pair<int, int> st;
    pair<int, int> en;
    st.first = gi();
    st.second = gi();
    en.first = gi();
    en.second = gi();
    if (st.first == en.first) {
      if (st.second > en.second) swap(st, en);
      hor.push_back(make_pair(st, en));
    } else {
      if (st.first > en.first) swap(st, en);
      vert.push_back(make_pair(st, en));
    }
  }
  sort(hor.begin(), hor.end(), comphor);
  sort(vert.begin(), vert.end(), compvert);
  int cntHor = 0;
  for (int i = 0; i < (hor.size()); ++i) {
    argum.clear();
    argum.push_back(make_pair(hor[i].first.second, hor[i].second.second));
    while (i + 1 < hor.size() && hor[i + 1].first.first == hor[i].first.first) {
      ++i;
      argum.push_back(make_pair(hor[i].first.second, hor[i].second.second));
    }
    workhor(hor[i].first.first);
    cntHor++;
    wasX.insert(hor[i].first.first);
  }
  if (n - 1 > cntHor) {
    int toAdd = ((n - 1 - cntHor) % 2) ? 1 : 2;
    for (long long i = (1); i < (k + 5); ++i)
      if (!wasX.count(i)) {
        --toAdd;
        addNim(i, 1, m);
        if (!toAdd) break;
      }
  }
  int cntVert = 0;
  for (int i = 0; i < (vert.size()); ++i) {
    argum.clear();
    argum.push_back(make_pair(vert[i].first.first, vert[i].second.first));
    while (i + 1 < vert.size() &&
           vert[i + 1].first.second == vert[i].first.second) {
      ++i;
      argum.push_back(make_pair(vert[i].first.first, vert[i].second.first));
    }
    workvert(vert[i].first.second);
    cntVert++;
    wasY.insert(vert[i].first.second);
  }
  if (m - 1 > cntVert) {
    int toAdd = ((m - 1 - cntVert) % 2) ? 1 : 2;
    for (long long i = (1); i < (k + 5); ++i)
      if (!wasY.count(i)) {
        --toAdd;
        addNim(i, 0, n);
        if (!toAdd) break;
      }
  }
  int res = 0;
  for (int i = 0; i < (nims.size()); ++i) res ^= nims[i];
  if (res == 0)
    printf("SECOND\n");
  else {
    printf("FIRST\n");
    for (int i = 0; i < (nims.size()); ++i)
      if ((nims[i] ^ res) < nims[i]) {
        cutFrom(i, nims[i] - (nims[i] ^ res));
        return;
      }
  }
}
int main(int argc, char **argv) {
  solution();
  return 0;
}