Problem:
Score : 200 points

Problem Statement

Given are 1-digit positive integers a and b. Consider these two strings: the concatenation of b copies of the digit a, and the concatenation of a copies of the digit b. Which of these is lexicographically smaller?

Constraints

1 \leq a \leq 9

1 \leq b \leq 9

a and b are integers.

Input

Input is given from Standard Input in the following format:

a b

Output

Print the lexicographically smaller of the two strings. (If the two strings are equal, print one of them.)

Sample Input 1

4 3

Sample Output 1

3333

We have two strings 444 and 3333. Between them, 3333 is the lexicographically smaller.

Sample Input 2

7 7

Sample Output 2

7777777

Solution in PHP (5.6.30) (judge verdict: Accepted)

<?php
  function fc($arg1,$arg2) {
  	$res = "";
  	for($n=0;$n<=$arg2;$n++) {
      $res = $res.$arg1;
    }
  	return $res;
}
  
  $S = trim(fgets(STDIN));
  list($a,$b) = explode(" ",$S);

	$str1 = "a" . fc($a,$b);
	$str2 = "a" .  fc($b,$a);

  if($str1 > $str2) {
    $res = $str2;
  } elseif($str2 > $str1) {
    $res = $str1;
  } else {
    $res = $str1;
  }

	print substr($res,2,strlen($res));

?>