public class Ch01 {
public static void main(String[] args) {
Scanner src = new Scanner(System.in);
String x =src.next();
String ans="";
if ((x).length() == 4) {
String tmp[] = x.split("");
// 1
for (int i = 0; i < tmp.length; i++) {
switch (tmp[i]) {
case "1":
ans += " * ";
break;
case "4":
ans += "* * ";
break;
case "6":
ans += "* ";
break;
default:
ans += "***** ";
break;
}
}
ans += "\n";
// 2
for (int i = 0; i < tmp.length; i++) {
switch (tmp[i]) {
case "1":
ans += " * ";
break;
case "2":
ans += " * ";
break;
case "3":
ans += " * ";
break;
case "4":
ans += "* * ";
break;
case "5":
ans += "* ";
break;
case "6":
ans += "* ";
break;
case "7":
ans += " * ";
break;
default:
ans += "* * ";
break;
}
}
ans += "\n";
// 3
for (int i = 0; i < tmp.length; i++) {
switch (tmp[i]) {
case "1":
ans += " * ";
break;
case "7":
ans += " * ";
break;
case "0":
ans += "* * ";
break;
default:
ans += "***** ";
break;
}
}
ans += "\n";
// 4
for (int i = 0; i < tmp.length; i++) {
switch (tmp[i]) {
case "1":
ans += " * ";
break;
case "2":
ans += "* ";
break;
case "6":
ans += "* * ";
break;
case "8":
ans += "* * ";
break;
case "0":
ans += "* * ";
break;
default:
ans += " * ";
break;
}
}
ans += "\n";
// 5
for (int i = 0; i < tmp.length; i++) {
switch (tmp[i]) {
case "1":
ans += " * ";
break;
case "4":
ans += " * ";
break;
case "7":
ans += " * ";
break;
case "9":
ans += " * ";
break;
default:
ans += "***** ";
break;
}
}
ans += "\n";