"use strict";
const Main = function(input){
	let xs = input.trim().split(' ');
    let a =xs[0].charAt(xs[0].length-1);
    let b =xs[1].charAt(0);
    let c =xs[1].charAt(xs[1].length-1);
    let d =xs[2].charAt(0);
    
    console.log(a+b+c+d); 
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));