
import java.net.InetAddress;
import java.net.UnknownHostException;


public class gethost implements Runnable {
    public void run() {
	while (true) {

	    try {
		String s = InetAddress.getLocalHost().getHostName();
		System.err.println( s );
	    } catch (UnknownHostException uhe) {
		uhe.printStackTrace();
		return;
	    }

	    try {
		Thread.sleep( 10 );
	    } catch (InterruptedException e) {
		// ignore
	    }
	}
    }

    
    public static void main( String[] args ) throws Exception {
//	InetAddress.getByName( "localhost" );
    
	for (int i = 0; i < 25; ++i) {
	    Thread t = new Thread( new gethost() );
	    t.start();
	}
    }
}

