import javax.swing.*;
class worker extends Thread 
{public String name; 
 public worker(String namei)
 {name=namei;}
 
 public void run()
 { for(int i=0;i<5;i++) 
   {   try{
	   if(name.equals("ali")) Thread.sleep(1000);
	   else if(name.equals("veli")) Thread.sleep(2000);
	   else Thread.sleep(3000);
	 System.out.println(name+"-->"+i);
      }catch(InterruptedException ex) {System.out.println("error");}
   }
 }
}

public class H9Ex2 
{
public static void main(String args[])
{worker i1=new worker("ali");
 worker i2=new worker("veli");
 worker i3=new worker("zeynep");
 i1.start();
 i2.start();
 i3.start();
}
}
