import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
char[][] arr = new char[5][15];
int max = 0;
for (int i = 0; i < 5; i++) {
String s = br.readLine();
int lineLen = s.length();
if (lineLen > max) {
max = lineLen;
}
for (int j = 0; j < lineLen; j++) {
arr[i][j] = s.charAt(j);
}
}
for (int i = 0; i < max; i++) {
for (int j = 0; j < 5; j++) {
if (arr[j][i] == '\0') continue;
bw.write(arr[j][i]);
}
}
bw.flush();
}
}