#!/usr/bin/perl

for $a (3..30) {
  for $b (1..30) {
    next if ($a == $b);
    $c = (3 * $a + $b)/3;
    next if (int($c) != $c);
    $sum = $a + $b + $c;
    next if ($sum < 38);
    next if ($sum > 50);
    next if ($sum % 2 != 0);
    next if ($a == $c);
    next if ($b == $c);
    next if ($a == 20); next if ($b == 20); next if ($c == 20);
    next if ($a == 15); next if ($b == 15); next if ($c == 15);
    next if ($a == 8); next if ($b == 8); next if ($c == 8);
    next if ($a == 5); next if ($b == 5); next if ($c == 5);
    print "$sum $a $b $c\n";
  }
}
