"use strict";
const main = arg => {
  let A = arg.split("\n").map(n=>n*1);
  let N = A[0];
  A = A.slice(1, N+1);
  let temp = 0;
  let Max = Math.max(...A);
  for(let i = 0; i < N; i++){

      console.log(Max);

  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
