- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
import java.io.*;
import java.util.*;
public class Solution
{
public static void main(String[] args) throws Exception
{ Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int z = scanner.nextInt();
if (a < b && a < c && a < z)
{ if (b < c && b < z)
{if (c < z)
{System.out.println(z + " " + c + " " + b + " " + a);}
else
{System.out.println(c + " " + z + " " + b + " " + a);} }
else if (c < b && c < z)
{ if (b < z)
{System.out.println(z + " " + b + " " + c + " " + a);}
else
{System.out.println(b + " " + z + " " + c + " " + a);} }
else if (z < c && z < b)
{ if (c < b)
{System.out.println(b + " " + c + " " + z + " " + a);}
else
{System.out.println(c + " " + b + " " + z + " " + a);} } }
else if (b < a && b < c && b < z)
{ if (a < c && a < z)
{ if (c < z)
{System.out.println(z + " " + c + " " + a + " " + b);}
else
{System.out.println(c + " " + z + " " + a + " " + b);} }
else if (c < a && c < z)
{ if (a < z)
{System.out.println(z + " " + a + " " + c + " " + b);}
else
{System.out.println(a + " " + z + " " + c + " " + b);} }
else if (z < a && z < c)
{ if (a < c)
{System.out.println(c + " " + a + " " + z + " " + b);}
else
{System.out.println(a + " " + c + " " + z + " " + b);} } }
else if (c < a && c < b && c < z)
{ if (a < b && a < z)
{ if (b < z)
{System.out.println(z + " " + b + " " + a + " " + c);}
else
{System.out.println(b + " " + z + " " + a + " " + c);} }
else if (b < a && b < z)
{ if (a < z)
{System.out.println(z + " " + a + " " + b + " " + c);}
else
{System.out.println(a + " " + z + " " + b + " " + c);} }
else if (z < a && z < b)
{ if (a < b)
{System.out.println(b + " " + a + " " + z + " " + c);}
else
{System.out.println(a + " " + b + " " + z + " " + c);} } }
else if (z < a && z < b && z < c)
{ if (a < c && a < b)
{ if (c < b)
{System.out.println(b + " " + c + " " + a + " " + z);}
else
{System.out.println(c + " " + b + " " + a + " " + z);} }
else if (c < a && c < b)
{ if (a < b)
{System.out.println(b + " " + a + " " + c + " " + z);}
else
{System.out.println(a + " " + b + " " + c + " " + z);} }
else if (b < a && b < c)
{
if (a < c)
{System.out.println(c + " " + a + " " + b + " " + z);}
else
{System.out.println(a + " " + c + " " + b + " " + z);} } }
}
}