import std.stdio;
import std.conv;
import std.string;
import std.algorithm;

void main()
{
  auto n = readln;
  auto v = map!(to!int)(readln.strip.split).fold!(min,max,"a+b");

  writefln("%d %d %d",v[0],v[1],v[2]);
}