using System;
public class Program
{
public static void Main()
//1
//int[,] a = new int[2,2];
//int sum= 0;
//for (int i = 0; i < a.GetLength(0); i++)
//{
// for (int j = 0; j < a.GetLength(1); j++)
// {
// a[i,j]=int.Parse(Console.ReadLine());
// sum+=a[i,j];
// }
//}
//Console.WriteLine(sum);
//2
//int[,] a = {{1,2,4},{5,1,3},{3,5,6}};
//int b= 1;
// if(a[i,j]%3 != 0)
// b*=a[i,j];
//Console.WriteLine(b);
//3
//int[,] a = {{11,2,31},{2,10,5},{24,8,2}};
//int[,] b = {{4,2,11},{23,2,5},{6,15,4}};
//int[,] c = new int[3,3];
//for (int i = 0; i < c.GetLength(0); i++)
// for (int j = 0; j < c.GetLength(1); j++)
// c[i,j]= a[i,j]+b[i,j];
// Console.Write(c[i,j]+" ");
// Console.WriteLine();
//4
//int n = int.Parse(Console.ReadLine());
//int m = int.Parse(Console.ReadLine());
//int[,] array = new int[n,m];
//int min=100;
//int min_i=100;
//int min_j= 100;
//for (int i = 0; i < array.GetLength(0); i++)
// for (int j = 0; j < array.GetLength(0); j++)
// array[i,j]=int.Parse(Console.ReadLine());
// if(array[i,j]<min)
// min= array[i,j];
// min_i= i;
// min_j= j;
//Console.WriteLine("Smallest element: "+ min);
//Console.WriteLine("n: "+min_i);
//Console.Write(" m: "+min_j);
//6
//int[,] array = new int[n,n];
// for (int j = 0; j < array.GetLength(1); j++)
// array[i,j]= int.Parse(Console.ReadLine());
// Console.Write(array[i,j]*array[i,j]+" ");
//7
int[,] a = new int[3,3];
int[] b= new int[9];
int count= 0;
for (int i = 0; i < a.GetLength(0); i++)
for (int j = 0; j < a.GetLength(1); j++)
a[i,j]=int.Parse(Console.ReadLine());
if(a[i,j]>=5)
b[count]=a[i,j];
count++;
}
for (int x = 0; x < b.Length; x++)
Console.Write(b[x]+" ");