// The "File_example" class.
import java.awt.*;
import java.io.*; //must import file package
public class File_example
{
    public static void main (String[] args) throws IOException  //must have throws IOException to make files works
    {
	PrintWriter pw = new PrintWriter (new FileWriter ("OUT1.txt")); //declares an object that will print to a file
	BufferedReader br = new BufferedReader (new FileReader ("DATA1.txt")); //declares an object that will read from a file
	String str = "";
	str = br.readLine (); //read from file, data type read in is string only
	int number;
	String s1[] = new String [5];
	String s2[] = new String [5];
	int num = 5;
	int num2 = 0;
	int num3 = 0;
	while (str != null)
	{
	    number = Integer.parseInt (str);
	    str = br.readLine ();
	    num2 = num - Math.abs (number);
	    num3 = num - num2;
	    if (number == 0)
		pw.println ("-----|-----");
	    if (number < 0)
	    {
		for (int m = 0 ; m < num2 ; m++)
		{
		    pw.print ("-");
		}
		for (int i = 0 ; i < num3 ; i++)
		{
		    pw.print ("*");
		}
		pw.print ("|-----");
		pw.println ();
	    }
	    if (number > 0)
	    {
		pw.print ("-----|");
		for (int m = 0 ; m < number ; m++)
		{
		    pw.print ("*");
		}
		for (int i = 0 ; i < num2 ; i++)
		{
		    pw.print ("-");
		}
		pw.println ();
	    }
	}
	pw.close (); //close file, make sure all output are included in output file
	br.close ();
	// Place your program here.  'c' is the output console
    } // main method
} // File_example class

