#pragma comment(linker, "/STACK:102400000,102400000")
#include <set>
#include <bitset>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <vector>
#include <ios>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <complex>
#include <numeric>
#include <functional>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cassert>
using namespace std;
#define CFF freopen ("aaa.txt", "r", stdin)
#define CPPFF ifstream cin ("aaa.txt")
#define DB(ccc) cout << #ccc << " = " << ccc << endl
#define PB push_back
#define MP(A, B) make_pair(A, B)
typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef pair <int, int> PII;
typedef pair <int, bool> PIB;
const int INF = 0x7FFFFFFF;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos (0.0);
const int maxn = 1e5 + 6666;
int A, B, C, vis[166][166];
struct node
{
int a, b, cnt;
node (int aa, int bb, int ccnt) : a (aa), b (bb), cnt (ccnt) {}
node () {}
};
struct point
{
int a, b, flag;
};
point par[166][166], out[666];
int pa, pb;
int bfs ()
{
memset (vis, false, sizeof (vis));
for (int i = 0; i < 166; i++)
for (int j = 0; j < 166; j++)
par[i][j].a = par[i][j].b = par[i][j].flag = -1;
vis[0][0] = true;
queue <node> qu;
qu.push (node (0, 0, 0));
while (!qu.empty ())
{
node tt = qu.front (); qu.pop ();
if (tt.a == C || tt.b == C)
{
pa = tt.a, pb = tt.b;
return tt.cnt;
}
int ta = tt.a, tb = B;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 1;
}
ta = A, tb = tt.b;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 2;
}
ta = 0, tb = tt.b;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 3;
}
ta = tt.a, tb = 0;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 4;
}
int tk = min (tt.a, B - tt.b);
ta = tt.a - tk, tb = tt.b + tk;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 5;
}
tk = min (tt.b, A - tt.a);
ta = tt.a + tk, tb = tt.b - tk;
if (!vis[ta][tb])
{
vis[ta][tb] = true;
qu.push (node (ta, tb, tt.cnt + 1));
par[ta][tb].a = tt.a;
par[ta][tb].b = tt.b;
par[ta][tb].flag = 6;
}
}
return -1;
}
int main()
{
// CFF;
while (scanf ("%d %d %d", &A, &B, &C) != EOF)
{
int tt = bfs ();
if (tt == -1)
puts ("impossible");
else
{
printf ("%d\n", tt);
int len = 0;
do
{
out[len].a = par[pa][pb].a;
out[len].b = par[pa][pb].b;
out[len++].flag = par[pa][pb].flag;
int tta = par[pa][pb].a, ttb = par[pa][pb].b;
pa = tta, pb = ttb;
} while (pa != -1 && pb != -1);
for (int i = len - 1; i >= 0; i--)
{
if (out[i].flag == 1) puts ("FILL(2)");
if (out[i].flag == 2) puts ("FILL(1)");
if (out[i].flag == 3) puts ("DROP(1)");
if (out[i].flag == 4) puts ("DROP(2)");
if (out[i].flag == 5) puts ("POUR(1,2)");
if (out[i].flag == 6) puts ("POUR(2,1)");
}
}
}
return 0;
}