/*
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
string a = Console.ReadLine();
string[] b = a.Split(' ');
int lx = Convert.ToInt32(b[0]);
int ly = Convert.ToInt32(b[1]);
int[,] map = new int[lx + 1, ly + 1];
int x = Convert.ToInt32(Console.ReadLine());
for(int i=0; i<x; i++)
{
string c = Console.ReadLine();
string[] d = c.Split(' ');
int[] o = new int[d.Length];
for (int p = 0; p < o.Length; p++)
{
o[p] = Convert.ToInt32(d[p]);
}
// o[0]: l, o[1]: d, o[2]: x, o[3]: y
int fx = o[2];
int fy = o[3];
if (o[1] == 0)
{
for (int j = 0; j < o[0]; j++)
{
map[fx, fy + j] = 1;
}
}
else
{
for (int j = 0; j < o[0]; j++)
{
map[fx + j, fy] = 1;
}
}
}
for (int i=1; i<=lx; i++)
{
for(int j=1; j<=ly; j++)
{
Console.Write(map[i, j] + " ");
}
Console.WriteLine();
}
}
}
}
*/
/*
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int[,] map = new int[101, 101];
for (int i = 0; i < 10; i++)
{
string t = Console.ReadLine();
string[] h = t.Split();
for (int j = 0; j < h.Length; j++)
{
map[i, j] = Convert.ToInt32(h[j]);
}
}
int x = 1;
int y = 1;
if (map[x, y] == 2)
{
map[x, y] = 9;
}
else
{
map[x, y] = 9;
for (; ; )
{
if(map[x, y + 1] == 0)
{
y++;
map[x, y] = 9;
}
else if(map[x, y + 1] == 2)
{
y++;
map[x, y] = 9;
break;
}
else if(map[x,y+1]==1)
{
if(map[x+1,y]==0)
{
x++;
map[x, y] = 9;
}
else if(map[x+1,y]==2)
{
x++;
map[x, y] = 9;
break;
}
else
{
break;
}
}
}
}
for(int i=0; i<10; i++)
{
for(int j=0; j<10; j++)
{
Console.Write(map[i, j] + " ");
}
Console.WriteLine();
}
}
}
}
*/
/*
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string [] args)
{
int[,] map = new int[11, 11];
for (int i = 0; i < 10; i++)
{
string x = Console.ReadLine();
string[] y = x.Split();
for (int j = 0; j < 10; j++)
{
map[i, j] = Convert.ToInt32(y[j]);
}
}
for (int j = 0; j < 10; j++)
{
if (map[10, j] == 1)
{
int i = 0;
for (i = 9; i >= 0; i--)
{
if (map[i, j] > 0)
{
Console.WriteLine("crash");
break;
}
else if (map[i, j] < 0)
{
Console.WriteLine("fall");
break;
}
}
if (i == -1)
{
Console.WriteLine("safe");
}
}
}
}
}
}
/*



