/* gcd of threee numbers */
/* author: srikanth bobbepalli id n0:n190002 */
import java.util.*;
class Main{
public static int gcd(int a,int b)// called method
{
if(b==0)
return a;
return gcd(b,a%b);
}
public static void main(String[] args)
{
int result;
Scanner sc=new Scanner(System.in);
System.out.println("enter the first number:");
int a=sc.nextInt();
System.out.println("enter the second number:");
int b=sc.nextInt();
System.out.println("enter the third number:");
int c=sc.nextInt();
result=gcd(a,gcd(b,c));// method calling
System.out.println("the gcd of three numbers" +"\t" +a +"\t" +b +"\t" +c+ " is " +result);
}
}