from math import sqrtx1 , y1 , r1 = map ( int , input ( ) . split ( ) ) x2 , y2 , r2 = map ( int , input ( ) . split ( ) )   d = sqrt ( ( x1 - x2 ) ** 2 + ( y1 - y2 ) ** 2 ) if d > r1 + r2 : print ( ( d - ( r1 + r2 ) ) / 2 ) elif d < abs ( r1 - r2 ) : print ( ( abs ( r1 - r2 ) - d ) / 2 ) else : print ( 0 ) NEW_LINE


import java . util . * ; import java . io . * ; import java . math . * ;   public class x190B { public static void main ( String omkar [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( infile . readLine ( ) ) ; long x1 = Long . parseLong ( st . nextToken ( ) ) ; long y1 = Long . parseLong ( st . nextToken ( ) ) ; long r1 = Long . parseLong ( st . nextToken ( ) ) ; st = new StringTokenizer ( infile . readLine ( ) ) ; long x2 = Long . parseLong ( st . nextToken ( ) ) ; long y2 = Long . parseLong ( st . nextToken ( ) ) ; long r2 = Long . parseLong ( st . nextToken ( ) ) ; double dist = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ; dist = Math . sqrt ( dist ) ; dist -= r1 + r2 ; if ( dist > 0 ) System . out . println ( dist / 2 ) ; else {

import sysimport mathdef input ( ) : return sys . stdin . readline ( ) . strip ( ) def iinput ( ) : return int ( input ( ) ) def rinput ( ) : return map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) def get_list ( ) : return list ( map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) mod = int ( 1e9 ) + 7   x1 , y1 , r1 = rinput ( ) x2 , y2 , r2 = rinput ( )   d = math . sqrt ( ( x2 - x1 ) * ( x2 - x1 ) + ( y2 - y1 ) * ( y2 - y1 ) ) - r1 - r2r = d / 2 f = - ( r + min ( r1 , r2 ) ) NEW_LINE


import math   x1 , y1 , r1 = map ( int , input ( ) . split ( ) ) x2 , y2 , r2 = map ( int , input ( ) . split ( ) )   d = ( x2 - x1 ) ** 2 + ( y2 - y1 ) ** 2 ans = 0.0   if ( d >= ( r1 + r2 ) ** 2 ) : ans = math . sqrt ( d ) - r1 - r2   elif ( d >= ( r1 - r2 ) ** 2 ) : ans = 0.0   else : ans = abs ( r1 - r2 ) - math . sqrt ( d )   ans /= 2 print ( ans ) NEW_LINE


import java . util . ArrayList ; import java . util . Scanner ;   public class Surrounded { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; ArrayList < Integer > firstInput = new ArrayList < > ( ) ; ArrayList < Integer > secondInput = new ArrayList < > ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { firstInput . add ( s . nextInt ( ) ) ; } for ( int i = 0 ; i < 3 ; i ++ ) { secondInput . add ( s . nextInt ( ) ) ; }   getMinRadius ( firstInput , secondInput ) ;   }   private static void getMinRadius ( ArrayList < Integer > firstInput , ArrayList < Integer > secondInput ) { double eucledianDistance = getEucledianDistance ( firstInput , secondInput ) ; double diameter = eucledianDistance - ( firstInput . get ( 2 ) + secondInput . get ( 2 ) ) ; double radius = diameter / 2.0 ; if ( radius <= 0 ) { if ( Math . max ( firstInput . get ( 2 ) , secondInput . get ( 2 ) ) > eucledianDistance + Math . min ( firstInput . get ( 2 ) , secondInput . get ( 2 ) ) ) { System . out . printf ( " % .15f " , Math . abs ( radius ) - Math . min ( firstInput . get ( 2 ) , secondInput . get ( 2 ) ) ) ; } else { System . out . printf ( " % .15f " , 0f ) ; } } else { System . out . printf ( " % .15f " , radius ) ;   } }   private static double getEucledianDistance ( ArrayList < Integer > firstInput , ArrayList < Integer > secondInput ) { return Math . sqrt ( Math . pow ( secondInput . get ( 1 ) - firstInput . get ( 1 ) , 2 ) + Math . pow ( secondInput . get ( 0 ) - firstInput . get ( 0 ) , 2 ) ) ; }   }

import mathx1 , y1 , r1 = map ( int , input ( ) . split ( ) ) x2 , y2 , r2 = map ( int , input ( ) . split ( ) ) d = math . sqrt ( ( x1 - x2 ) ** 2 + ( y1 - y2 ) ** 2 ) R = max ( r1 , r2 ) r = min ( r1 , r2 ) NEW_LINE


import java . io . * ; import java . util . * ; import java . util . HashSet ; import java . util . Scanner ; import java . util . Set ; import java . util . ArrayList ; import java . util . Collections ; import java . util . HashMap ; import java . util . Map ; import java . text . DecimalFormat ; import java . lang . Math ; import java . util . Iterator ; public class b90 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int x1 = sc . nextInt ( ) ; int y1 = sc . nextInt ( ) ; int r1 = sc . nextInt ( ) ; int x2 = sc . nextInt ( ) ; int y2 = sc . nextInt ( ) ; int r2 = sc . nextInt ( ) ; double d = Math . sqrt ( Math . pow ( x1 - x2 , 2 ) + Math . pow ( y1 - y2 , 2 ) ) ; if ( Math . pow ( x1 , 2 ) + Math . pow ( y1 , 2 ) == Math . pow ( r1 , 2 ) && Math . pow ( x2 , 2 ) + Math . pow ( y2 , 2 ) == Math . pow ( r2 , 2 ) ) { System . out . println ( 0 ) ; } else if ( d <= ( double ) ( r1 + r2 ) && 2 * d >= ( double ) ( r1 + r2 ) ) { System . out . println ( 0 ) ; } else if ( d < ( double ) Math . max ( r1 , r2 ) ) { System . out . println ( ( ( double ) Math . max ( r1 , r2 ) - ( d + ( double ) Math . min ( r1 , r2 ) ) ) / 2 ) ; } else { System . out . println ( ( d - ( double ) ( r1 + r2 ) ) / 2 ) ; } } }


import java . util . Scanner ;   public class B897 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int N = in . nextInt ( ) ; long mod = in . nextInt ( ) ; long answer = 0 ; for ( int n = 1 ; n <= N ; n ++ ) { String nTxt = Integer . toString ( n ) ; long zcy = Long . parseLong ( nTxt + new StringBuilder ( nTxt ) . reverse ( ) ) ; answer += zcy ; answer %= mod ; } System . out . println ( answer ) ; }   }

k , p = map ( int , input ( ) . split ( ) ) res = 0 for i in range ( 1 , k + 1 ) : res += int ( str ( i ) + ( str ( i ) [ : : - 1 ] ) ) res %= pprint ( res ) NEW_LINE


""" ▁ ▁ ▁ ▁ Chtholly ' s ▁ request ▁ ▁ ▁ ▁ You ▁ can ▁ solve ▁ it ▁ recursively """ import math , sysdef nextZCY ( num ) : NEW_LINE


def main ( ) :   k , p = map ( int , input ( ) . split ( ) )   table = [ 0 ] * ( k + 5 ) table [ 0 ] = 1 for i in range ( 1 , k + 5 ) : table [ i ] = table [ i - 1 ] * 10 table [ i ] %= p ans = 0 for i in range ( 1 , k + 1 ) : d = len ( str ( i ) ) j = list ( str ( i ) ) j . reverse ( ) j = int ( ' ' . join ( j ) ) ans += i * table [ d ] + j ans %= p print ( ans )   if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


import java . util . Scanner ;   public class Eieve {   public static void main ( String args [ ] ) {   Scanner input = new Scanner ( System . in ) ;   long k = input . nextLong ( ) , p = input . nextLong ( ) ; long j = 0 , i1 = 0 , sum = 0 , c = 1 , j1 = 0 ;   for ( int i = 1 ; i <= k ; i ++ ) { j = i ; j1 = i ; while ( j1 > 0 ) {   j = j * 10 + j1 % 10 ;


import java . math . BigInteger ; import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int k = in . nextInt ( ) ; int p = in . nextInt ( ) ; BigInteger sum = new BigInteger ( "0" ) ; String newNum = " " ; String num ; for ( int i = 1 ; i <= k ; i ++ ) { num = i + " " ; newNum = num ; for ( int j = num . length ( ) - 1 ; j >= 0 ; j -- ) { newNum += num . charAt ( j ) ; } BigInteger n = new BigInteger ( newNum ) ; sum = sum . add ( n ) ; } String pb1 = p + " " ; BigInteger pb2 = new BigInteger ( pb1 ) ; System . out . println ( sum . mod ( pb2 ) ) ; in . close ( ) ; }   }


import java . io . * ; import java . util . * ; import java . lang . * ;   public class Rextester { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; br . close ( ) ; int n = new Integer ( st . nextToken ( ) ) ; int k = new Integer ( st . nextToken ( ) ) ; int p = 0 ; long ans = 0 ; StringBuffer sb = new StringBuffer ( "11" ) ; for ( int a = 0 ; a < n ; a ++ ) { long x = new Long ( sb . toString ( ) ) ;


import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int k = scan . nextInt ( ) ; int P = scan . nextInt ( ) ; long sum = 0 ; for ( int i = 1 ; i <= k ; i ++ ) { String first = i + " " ; StringBuilder last = new StringBuilder ( first ) . reverse ( ) ; sum += Long . parseLong ( first + last ) ; sum = sum % P ; } System . out . println ( sum ) ; } }


import java . util . * ; import java . util . Scanner ; import java . io . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ;   import javax . lang . model . util . ElementScanner6 ;   public class pcc15c {   public static void main ( String args [ ] ) {   FastReader in = new FastReader ( ) ; PrintWriter pr = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; int t = 1 ;

from sys import stdin , stdoutnmbr = lambda : int ( stdin . readline ( ) ) lst = lambda : list ( map ( int , stdin . readline ( ) . split ( ) ) ) def fn ( x , y , p , q ) : if y + q <= b and max ( x , p ) <= l : return True if x + p <= l and max ( y , q ) <= b : return True return Falsefor _ in range ( 1 ) : NEW_LINE


I = lambda : [ * map ( int , input ( ) . split ( ) ) ] z , u , v = I ( ) , I ( ) , I ( ) r = 0 for x , y in ( z , z [ : : - 1 ] ) : for a , b in ( u , u [ : : - 1 ] ) : for c , d in ( v , v [ : : - 1 ] ) : r |= a + c <= x and max ( b , d ) <= yprint ( ' YNEOS ' [ 1 - r : : 2 ] ) NEW_LINE


a , b = map ( int , input ( ) . split ( ) ) c , d = map ( int , input ( ) . split ( ) ) e , f = map ( int , input ( ) . split ( ) )   for A , B in [ ( a , b ) , ( b , a ) ] : for C , D in [ ( c , d ) , ( d , c ) ] : for E , F in [ ( e , f ) , ( f , e ) ] : if C + E <= A and max ( D , F ) <= B : print ( ' YES ' ) exit ( ) print ( ' NO ' ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) a1 , b1 = map ( int , input ( ) . split ( ) ) a2 , b2 = map ( int , input ( ) . split ( ) ) ar1 = n * mar2 = ( a1 * b1 ) + ( a2 * b2 ) a = a1 + a2b = a1 + b2c = a2 + b1d = b1 + b2t = 1 def fu ( su , q , w , n , m ) : t = 1 mi = min ( n , m ) ma = max ( n , m ) if ( su <= mi ) : if ( q <= ma and w <= ma ) : return t else : t = 0 return t   elif ( su <= ma ) : if ( q <= mi and w <= mi ) : return t else : t = 0 return t else :   t = 0 return t z1 = fu ( a , b1 , b2 , n , m ) z2 = fu ( b , b1 , a2 , n , m ) z3 = fu ( c , a1 , b2 , n , m ) z4 = fu ( d , a1 , a2 , n , m ) NEW_LINE


a , b = [ int ( x ) for x in input ( ) . split ( ) ] c , d = [ int ( x ) for x in input ( ) . split ( ) ] e , f = [ int ( x ) for x in input ( ) . split ( ) ] def do ( a , b , c , d , e , f ) : for i in range ( 1 , 5 ) : if ( c + e <= a and d <= b and f <= b ) or ( d + f <= b and c <= a and e <= a ) : return " YES " if i % 2 : c , d = d , c e , f = f , e return " NO " print ( do ( a , b , c , d , e , f ) ) NEW_LINE


import com . sun . org . apache . bcel . internal . generic . AALOAD ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ; import java . util . stream . IntStream ; import javafx . util . Pair ;   public class Main {   public static void main ( String [ ] args ) throws IOException {   Scanner input = new Scanner ( System . in ) ; int a1 = input . nextInt ( ) ; int b1 = input . nextInt ( ) ; int a2 = input . nextInt ( ) ; int b2 = input . nextInt ( ) ; int a3 = input . nextInt ( ) ; int b3 = input . nextInt ( ) ; if ( ( a2 + a3 ) <= a1 && Math . max ( b2 , b3 ) <= b1 ) { System . out . println ( " YES " ) ; } else if ( ( a2 + a3 ) <= b1 && Math . max ( b2 , b3 ) <= a1 ) { System . out . println ( " YES " ) ; } else if ( ( a2 + b3 ) <= a1 && Math . max ( b2 , a3 ) <= b1 ) { System . out . println ( " YES " ) ; } else if ( ( a2 + b3 ) <= b1 && Math . max ( b2 , a3 ) <= a1 ) { System . out . println ( " YES " ) ; } else if ( ( b2 + a3 ) <= b1 && Math . max ( a2 , b3 ) <= a1 ) { System . out . println ( " YES " ) ; } else if ( ( b2 + a3 ) <= a1 && Math . max ( a2 , b3 ) <= b1 ) { System . out . println ( " YES " ) ; } else if ( ( b2 + b3 ) <= a1 && Math . max ( a2 , a3 ) <= b1 ) { System . out . println ( " YES " ) ; } else if ( ( b2 + b3 ) <= b1 && Math . max ( a2 , a3 ) <= a1 ) { System . out . println ( " YES " ) ; } else System . out . println ( " NO " ) ; }   }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . * ; public class Main { public static void print ( int [ ] arr ) { for ( int i = 0 ; i < arr . length ; i ++ ) { if ( i == arr . length - 1 ) System . out . print ( arr [ i ] ) ; else System . out . print ( arr [ i ] + " ▁ " ) ; } System . out . println ( ) ; } public static boolean method ( int [ ] arr ) { boolean flag = true ; for ( int i = 1 ; i < arr . length ; i += 2 ) { if ( arr [ i ] < arr [ i - 1 ] ) { int temp = arr [ i ] ; arr [ i ] = arr [ i - 1 ] ; arr [ i - 1 ] = temp ; } } for ( int i = 2 ; i < arr . length ; i += 2 ) { if ( arr [ i ] > arr [ i - 1 ] ) { int temp = arr [ i ] ; arr [ i ] = arr [ i - 1 ] ; arr [ i - 1 ] = temp ; } } for ( int i = 1 ; i < arr . length ; i ++ ) { if ( i % 2 != 0 && arr [ i ] < arr [ i - 1 ] ) flag = false ; else if ( i % 2 == 0 && arr [ i ] > arr [ i - 1 ] ) flag = false ; } return flag ; } public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int x = Integer . parseInt ( br . readLine ( ) ) ; String s = br . readLine ( ) ; String [ ] s1 = s . split ( " ▁ " ) ; int [ ] arr = new int [ x ] ; for ( int j = 0 ; j < s1 . length ; j ++ ) { arr [ j ] = ( Integer . parseInt ( s1 [ j ] ) ) ; } if ( method ( arr ) ) print ( arr ) ; else System . out . println ( " Impossible " ) ; } }

n = int ( input ( ) ) r = lambda : list ( map ( int , input ( ) . split ( ) ) ) arr = r ( )   arr . sort ( ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) ans = [ ] check = sorted ( a ) i , j = 0 , n - 1 while i < j : ans . append ( check [ i ] ) ans . append ( check [ j ] ) i += 1 j -= 1 if i == j : ans . append ( check [ i ] ) print ( * ans ) NEW_LINE


import sys , mathsys . setrecursionlimit ( 10 ** 8 ) ''' def ▁ fun ( ) : ▁ ▁ ▁ ▁ for ▁ i ▁ in ▁ range ( 16 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ for ▁ j ▁ in ▁ range ( 4 ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ if ▁ i & (1 < < j ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( j , end = ' ' ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ print ( ) import ▁ binarytreefrom ▁ collections ▁ import ▁ dequebst ▁ = ▁ binarytree . tree ( height = 4 , is _ perfect = True ) print ( bst ) def ▁ s ( bst ) : ▁ ▁ ▁ ▁ if ▁ bst : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ bst . left , bst . right ▁ = ▁ bst . right , bst . left ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . right ) ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ s ( bst . left ) s ( bst ) print ( bst ) ''' n = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) arr . sort ( ) x = [ ] z = 1 for i in range ( n // 2 ) : x . append ( arr [ i ] ) x . append ( arr [ len ( arr ) - i - 1 ] ) if n % 2 == 1 : x . append ( arr [ ( n // 2 ) ] ) for i in range ( n ) : if i % 2 == 1 : if x [ i ] < x [ i - 1 ] : print ( " Impossible " ) z = 0 break else : if x [ i ] > x [ i - 1 ] : print ( " Impossible " ) z = 0 breakif z != 0 : print ( ' ▁ ' . join ( map ( str , x ) ) ) NEW_LINE


n = int ( input ( ) ) array = list ( map ( int , input ( ) . split ( ) ) ) array . sort ( ) ans = [ ]   for i in range ( n // 2 ) : ans . append ( array [ i ] ) ans . append ( array [ n - i - 1 ] )   if len ( array ) % 2 != 0 : ans . append ( array [ n // 2 ] ) print ( " ▁ " . join ( [ str ( i ) for i in ans ] ) ) NEW_LINE


n = int ( input ( ) )   numero = input ( ) . split ( ) for i in range ( n ) : numero [ i ] = int ( numero [ i ] )     if n == 1 : print ( numero [ 0 ] ) else : for i in range ( 1 , n ) : if i % 2 != 0 and numero [ i ] < numero [ i - 1 ] : auxiliar = numero [ i ] numero [ i ] = numero [ i - 1 ] numero [ i - 1 ] = auxiliar elif i % 2 == 0 and numero [ i ] > numero [ i - 1 ] : auxiliar = numero [ i ] numero [ i ] = numero [ i - 1 ] numero [ i - 1 ] = auxiliar   respuesta = str ( numero [ 0 ] ) for i in range ( 1 , n ) : respuesta = respuesta + ' ▁ ' + str ( numero [ i ] ) print ( respuesta ) NEW_LINE


import java . io . * ; import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = ( int ) sc . nextLong ( ) ; PrintWriter pw = new PrintWriter ( System . out ) ; Long [ ] x = new Long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { x [ i ] = sc . nextLong ( ) ; } Arrays . sort ( x ) ; int z = n / 2 ; if ( n % 2 == 0 ) { for ( int i = 0 ; i < z ; i ++ ) { if ( i != 0 ) System . out . print ( " ▁ " ) ; System . out . print ( x [ i ] + " ▁ " + x [ x . length - i - 1 ] ) ; } } else { for ( int i = 0 ; i < z ; i ++ ) { if ( i != 0 ) System . out . print ( " ▁ " ) ; System . out . print ( x [ i ] + " ▁ " + x [ x . length - i - 1 ] ) ; } System . out . print ( " ▁ " + x [ z ] ) ; } } }


import java . io . IOException ; import java . io . PrintWriter ; import java . util . * ; public class Main {   public static void main ( String [ ] args ) throws IOException {


import java . io . * ; import java . util . * ; public class Mangos { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = ( int ) sc . nextLong ( ) ; PrintWriter pw = new PrintWriter ( System . out ) ; Long [ ] x = new Long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { x [ i ] = sc . nextLong ( ) ; } Arrays . sort ( x ) ; int z = n / 2 ; if ( n % 2 == 0 ) { for ( int i = 0 ; i < z ; i ++ ) { if ( i != 0 ) System . out . print ( " ▁ " ) ; System . out . print ( x [ i ] + " ▁ " + x [ x . length - i - 1 ] ) ; } } else { for ( int i = 0 ; i < z ; i ++ ) { if ( i != 0 ) System . out . print ( " ▁ " ) ; System . out . print ( x [ i ] + " ▁ " + x [ x . length - i - 1 ] ) ; } System . out . print ( " ▁ " + x [ z ] ) ; } } }


import java . util . * ; import java . io . * ; public class Bets {   public static void main ( String [ ] args ) throws java . lang . Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) , m = Integer . parseInt ( st . nextToken ( ) ) ; int a [ ] [ ] = new int [ m ] [ 4 ] ; for ( int i = 0 ; i < m ; i ++ ) { StringTokenizer s = new StringTokenizer ( br . readLine ( ) ) ; a [ i ] [ 0 ] = Integer . parseInt ( s . nextToken ( ) ) ; a [ i ] [ 1 ] = Integer . parseInt ( s . nextToken ( ) ) ; a [ i ] [ 2 ] = Integer . parseInt ( s . nextToken ( ) ) ; a [ i ] [ 3 ] = Integer . parseInt ( s . nextToken ( ) ) ; } int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { int min = 10001 , max = 0 , position = - 1 ; for ( int p = 0 ; p < m ; p ++ ) { if ( a [ p ] [ 0 ] <= i && a [ p ] [ 1 ] >= i ) { if ( a [ p ] [ 2 ] < min ) { min = a [ p ] [ 2 ] ; position = p ; }

n , m = map ( int , input ( ) . split ( ) ) NEW_LINE athletes = { } NEW_LINE for i in range ( m ) : l , r , t , c = map ( int , input ( ) . split ( ) ) NEW_LINE athletes [ i + 1 ] = [ l , r , t , c ]   ans = 0 NEW_LINE for i in range ( 1 , n + 1 ) : lowTime = 10 ** 5 NEW_LINE money = 0 NEW_LINE for athlete in athletes : if NEW_LINE athletes [ athlete ] [ 0 ] <= i <= athletes [ athlete ] [ 1 ] and athletes [ athlete ] [ 2 ] < lowTime : lowTime = athletes [ athlete ] [ 2 ] NEW_LINE money = athletes [ athlete ] [ 3 ] NEW_LINE ans += money   print ( ans ) NEW_LINE


n = [ int ( i ) for i in input ( ) . split ( ) ]   batata = [ 1001 ] * ( n [ 0 ] ) NEW_LINE score = [ 0 ] * ( n [ 0 ] )   for i in range ( n [ 1 ] ) : all = [ int ( i ) for i in input ( ) . split ( ) ] NEW_LINE for b in range ( all [ 0 ] - 1 , all [ 1 ] ) : if NEW_LINE batata [ b ] > all [ 2 ] : batata [ b ] = all [ 2 ] NEW_LINE score [ b ] = all [ 3 ] NEW_LINE sum = 0 NEW_LINE for i in range ( n [ 0 ] ) : sum += score [ i ]   print ( sum )           NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) NEW_LINE athletes = { } NEW_LINE for i in range ( m ) : l , r , t , c = map ( int , input ( ) . split ( ) ) NEW_LINE athletes [ i + 1 ] = [ l , r , t , c ] NEW_LINE ans = 0 NEW_LINE for i in range ( 1 , n + 1 ) : lowTime = 10 ** 5 NEW_LINE money = 0 NEW_LINE for athlete in athletes : if NEW_LINE athletes [ athlete ] [ 0 ] <= i <= athletes [ athlete ] [ 1 ] and athletes [ athlete ] [ 2 ] < lowTime : lowTime = athletes [ athlete ] [ 2 ] NEW_LINE money = athletes [ athlete ] [ 3 ] NEW_LINE ans += money NEW_LINE print ( ans ) NEW_LINE


import java . util . Arrays ; import java . util . Scanner ;   public class B69 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int N = in . nextInt ( ) ; int M = in . nextInt ( ) ; int [ ] minTime = new int [ N ] ; Arrays . fill ( minTime , Integer . MAX_VALUE ) ; int [ ] money = new int [ N ] ; for ( int m = 0 ; m < M ; m ++ ) { int L = in . nextInt ( ) - 1 ; int R = in . nextInt ( ) - 1 ; int T = in . nextInt ( ) ; int C = in . nextInt ( ) ; for ( int n = L ; n <= R ; n ++ ) { if ( T < minTime [ n ] ) { money [ n ] = C ; minTime [ n ] = T ; } } } int answer = 0 ; for ( int amount : money ) { answer += amount ; } System . out . println ( answer ) ; }   }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayList ; import java . util . Stack ;   public class Zebras { public static void main ( String [ ] a ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; char [ ] day = br . readLine ( ) . toCharArray ( ) ; Stack < ArrayList < Integer > > zebras = new Stack < ArrayList < Integer > > ( ) ; Stack < ArrayList < Integer > > nonZebras = new Stack < ArrayList < Integer > > ( ) ; for ( int i = 0 ; i < day . length ; i ++ ) { if ( day [ i ] == '0' ) { if ( ! nonZebras . isEmpty ( ) ) { ArrayList < Integer > x = nonZebras . pop ( ) ; x . add ( i + 1 ) ; zebras . push ( x ) ; } else { ArrayList < Integer > x = new ArrayList < Integer > ( ) ; x . add ( i + 1 ) ; zebras . push ( x ) ; } } else { if ( ! zebras . isEmpty ( ) ) { ArrayList < Integer > x = zebras . pop ( ) ; x . add ( i + 1 ) ; nonZebras . push ( x ) ; } else { System . out . println ( - 1 ) ; return ; } } } if ( nonZebras . isEmpty ( ) ) { out . println ( zebras . size ( ) ) ; while ( ! zebras . isEmpty ( ) ) { ArrayList < Integer > x = zebras . pop ( ) ; out . print ( x . size ( ) ) ; for ( int s : x ) out . print ( " ▁ " + s ) ; out . println ( ) ; } } else { out . println ( - 1 ) ; } out . flush ( ) ; } }

s = input ( ) l = [ ] even = [ ] odd = [ ] f = 1 for i in range ( len ( s ) ) : if s [ i ] == '0' : if len ( even ) != 0 : ind = even . pop ( ) l [ ind ] . append ( i + 1 ) odd . append ( ind ) else : l . append ( [ i + 1 ] ) odd . append ( len ( l ) - 1 ) else : if len ( odd ) : ind = odd . pop ( ) l [ ind ] . append ( i + 1 ) even . append ( ind ) else : f = 0 breakif f and len ( even ) == 0 : print ( len ( l ) ) for x in l : print ( len ( x ) , * x ) else : print ( - 1 ) NEW_LINE


s = input ( ) res , p = [ ] , - 1   for i in range ( len ( s ) ) : j = i + 1 if s [ i ] == '0' : if p > - 1 : res [ p ] . append ( j ) p -= 1 else : res . append ( [ j ] ) else : p += 1 if p >= len ( res ) : print ( - 1 ) exit ( ) res [ p ] . append ( j )       if p != - 1 : print ( - 1 ) exit ( )           print ( len ( res ) ) for x in res : print ( len ( x ) , * x ) NEW_LINE


from collections import deque l = input ( ) az = deque ( [ ] ) z = deque ( [ ] ) f = 0 for i in range ( len ( l ) ) : if l [ i ] == '0' : if len ( az ) == 0 : z . append ( [ i + 1 ] ) else : az [ 0 ] . append ( i + 1 ) z . append ( az [ 0 ] ) az . popleft ( ) else : NEW_LINE


import com . sun . org . apache . bcel . internal . generic . AALOAD ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . * ; import java . util . stream . IntStream ; import javafx . util . Pair ;   public class Main { static void sort ( int a [ ] ) { Random ran = new Random ( ) ; for ( int i = 0 ; i < a . length ; i ++ ) { int r = ran . nextInt ( a . length ) ; int temp = a [ r ] ; a [ r ] = a [ i ] ; a [ i ] = temp ; } Arrays . sort ( a ) ; } public static void main ( String [ ] args ) throws IOException { Scanner input = new Scanner ( System . in ) ; int n , k ; n = input . nextInt ( ) ; k = input . nextInt ( ) ; char a [ ] [ ] = new char [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { Arrays . fill ( a [ i ] , ' S ' ) ; } for ( int i = 0 ; i < n ; i ++ ) { if ( k == 0 ) break ; for ( int j = 0 ; j < n ; j ++ ) { if ( k == 0 ) break ; if ( ( i + j ) % 2 == 0 ) { a [ i ] [ j ] = ' L ' ; k -- ; } } } if ( k > 0 ) { System . out . println ( " NO " ) ; return ; } System . out . println ( " YES " ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { System . out . print ( a [ i ] [ j ] ) ; } System . out . println ( ) ; } } }

import sys , os , ioimport math , bisect , operatorinf , mod = float ( ' inf ' ) , 10 ** 9 + 7 NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) map , islands = [ [ ' S ' for x in range ( n ) ] for y in range ( n ) ] , 0     def print_map ( ) : print ( " YES " ) for line in map : print ( " " . join ( line ) )     for i in range ( n ) : for j in range ( n ) : if islands == k : print_map ( ) exit ( ) if ( i + j ) - 1 & 1 : map [ i ] [ j ] = ' L ' islands += 1 if islands == k : print_map ( ) exit ( )   print ( " NO " ) NEW_LINE


from collections import defaultdict , Counter import sys import bisectimport mathdef get_array ( ) : return list ( map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) def get_ints ( ) : return map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) def input ( ) : return sys . stdin . readline ( ) . strip ( )     ( n , k ) = get_ints ( )   mat = [ [ ' S ' for _ in range ( n ) ] for _ in range ( n ) ] if n & 1 : s = ( ( n + 1 ) // 2 ) * ( ( n + 1 ) // 2 ) + ( n // 2 ) * ( n // 2 ) if k > s : print ( " NO " ) else : print ( " YES " ) row = 0 while ( k ) : for col in range ( row % 2 , n , 2 ) : if k == 0 : break mat [ row ] [ col ] = ' L ' k -= 1 NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) matrix = [ [ " S " for i in range ( n ) ] for j in range ( n ) ] for i in range ( n ) : for j in range ( n ) : if k > 0 : if i % 2 == 0 and j % 2 == 0 : matrix [ i ] [ j ] = " L " k -= 1 elif i % 2 == 1 and j % 2 == 1 : matrix [ i ] [ j ] = " L " k -= 1 if k > 0 : print ( " NO " ) else : print ( " YES " ) for lst in matrix : print ( " " . join ( lst ) ) NEW_LINE


n , k = input ( ) . split ( ) n , k = int ( n ) , int ( k ) if k > ( n * n + 1 ) // 2 : print ( " NO " ) exit ( ) print ( " YES " ) for i in range ( 0 , n ) : for j in range ( 0 , n ) : if ( ( i + j ) % 2 == 0 and k > 0 ) : print ( ' L ' , end = ' ' ) k -= 1 else : print ( ' S ' , end = ' ' ) print ( ) NEW_LINE


import java . util . Scanner ;   public class CF544_D2_B { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; int k = scanner . nextInt ( ) ; char [ ] [ ] map = new char [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i % 2 == 0 ) { if ( j % 2 == 1 || k == 0 ) { map [ i ] [ j ] = ' S ' ; } else if ( k > 0 ) { map [ i ] [ j ] = ' L ' ; k -- ; } } else { if ( j % 2 == 0 || k == 0 ) { map [ i ] [ j ] = ' S ' ; } else if ( k > 0 ) { map [ i ] [ j ] = ' L ' ; k -- ; } } } } if ( k == 0 ) { printMap ( map ) ; } else { System . out . println ( " NO " ) ; }    }   static void printMap ( char [ ] [ ] map ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < map . length ; i ++ ) { for ( int j = 0 ; j < map . length ; j ++ ) { System . out . print ( map [ i ] [ j ] ) ; } System . out . println ( ) ; }   } }


import java . io . BufferedWriter ; import java . io . ByteArrayInputStream ; import java . io . FileInputStream ; import java . io . FileWriter ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . Arrays ; import java . util . InputMismatchException ;   public class Main { private static final long MOD = ( long ) 1e9 + 7 ; static InputStream is ; static PrintWriter out ; static String INPUT = " " ; static int lenbuf = 0 , ptrbuf = 0 ; private static byte [ ] inbuf = new byte [ 1024 ] ; static boolean readFile = false ;


import java . util . Scanner ; public class A1393 { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; int answer = N / 2 + 1 ; System . out . println ( answer ) ; } } }

t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : NEW_LINE INDENT n = int ( input ( ) ) NEW_LINE if n == 1 : NEW_LINE INDENT print ( n ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( n // 2 + 1 ) NEW_LINE DEDENT DEDENT


import sys NEW_LINE from collections import * NEW_LINE from heapq import * NEW_LINE import math NEW_LINE import bisect NEW_LINE def input ( ) : NEW_LINE INDENT return sys . stdin . readline ( ) NEW_LINE DEDENT for _ in range ( int ( input ( ) ) ) : NEW_LINE INDENT n = int ( input ( ) ) NEW_LINE if n % 2 : NEW_LINE INDENT tmp = ( n - 1 ) // 2 NEW_LINE print ( 1 + tmp ) NEW_LINE DEDENT else : NEW_LINE INDENT tmp = n // 2 NEW_LINE print ( tmp + 1 ) NEW_LINE DEDENT DEDENT


for _ in range ( int ( input ( ) ) ) : NEW_LINE INDENT print ( int ( input ( ) ) // 2 + 1 ) NEW_LINE DEDENT


t = int ( input ( ) ) NEW_LINE for i in range ( t ) : NEW_LINE INDENT n = int ( input ( ) ) NEW_LINE print ( n // 2 + 1 ) NEW_LINE DEDENT


import java . util . Scanner ; public class Div2A { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = Integer . parseInt ( scanner . nextLine ( ) ) ; int n ; for ( int i = 0 ; i < t ; i ++ ) { n = Integer . parseInt ( scanner . nextLine ( ) ) ; System . out . println ( ( n / 2 ) + 1 ) ; } scanner . close ( ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . StringTokenizer ; public class Main { static class FastScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } int [ ] nextArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } long [ ] nextArray ( long n ) { long [ ] a = new long [ ( int ) n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextLong ( ) ; return a ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } static class FastWriter extends PrintWriter { FastWriter ( ) { super ( System . out ) ; } void println ( int [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; } void println ( long [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { print ( array [ i ] + " ▁ " ) ; } println ( ) ; } } public static void main ( String [ ] args ) { FastScanner in = new FastScanner ( ) ; FastWriter out = new FastWriter ( ) ; int t = in . nextInt ( ) ; while ( t -- > 0 ) { int n = in . nextInt ( ) ; out . println ( ( n / 2 ) + 1 ) ; } out . close ( ) ; } }


import java . io . * ; import java . util . * ; import static java . lang . Math . * ;   public class Main implements Runnable {   private boolean console = false ; private long MOD = 1000_000_007L ; private int MAX = 1000_001 ;   private void solve1 ( ) {   int n = in . ni ( ) , m = in . ni ( ) ; ArrayList < Pair > [ ] list = new ArrayList [ m + 1 ] ;   for ( int i = 0 ; i <= m ; ++ i ) { list [ i ] = new ArrayList < > ( ) ; }   for ( int i = 0 ; i < n ; ++ i ) { String name = in . ns ( ) ; int num = in . ni ( ) ; int score = in . ni ( ) ;   list [ num ] . add ( new Pair ( name , score ) ) ; }   for ( int i = 1 ; i <= m ; ++ i ) {   list [ i ] . sort ( ( a , b ) -> b . score - a . score ) ;   if ( list [ i ] . size ( ) == 2 ) { out . println ( list [ i ] . get ( 0 ) . name + " ▁ " + list [ i ] . get ( 1 ) . name ) ; continue ; }   if ( list [ i ] . get ( 1 ) . score == list [ i ] . get ( 2 ) . score ) { out . println ( " ? " ) ; continue ; }   out . println ( list [ i ] . get ( 0 ) . name + " ▁ " + list [ i ] . get ( 1 ) . name ) ; }    }   class Pair { String name ; int score ;   public Pair ( String name , int score ) { this . name = name ; this . score = score ; } }   private void solve ( ) { int testCases = 1 ;

def main ( ) : N , M = map ( int , input ( ) . split ( ) ) x = { } for i in range ( M ) : x [ i + 1 ] = [ ] for j in range ( N ) : a , b , c = ( input ( ) . split ( ) ) b = int ( b ) c = int ( c ) x [ b ] += [ ( c , a ) ] for k in range ( M ) : y = sorted ( x [ k + 1 ] ) [ : : - 1 ] if len ( y ) > 2 and ( y [ 1 ] [ 0 ] == y [ 2 ] [ 0 ] ) : print ( " ? " ) else : print ( y [ 0 ] [ 1 ] + ' ▁ ' + y [ 1 ] [ 1 ] ) if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


from operator import itemgetterfrom collections import defaultdictn , m = map ( int , input ( ) . split ( ) ) dicta = defaultdict ( list ) details = [ ] for i in range ( n ) : participant = input ( ) . split ( ) participant [ 1 ] = int ( participant [ 1 ] ) participant [ 2 ] = int ( participant [ 2 ] ) details . append ( participant )   details . sort ( key = itemgetter ( 1 , 2 ) ) for j in range ( n ) : dicta [ details [ j ] [ 1 ] ] . append ( [ details [ j ] [ 0 ] , details [ j ] [ 2 ] ] ) for key in dicta . keys ( ) : valu = len ( dicta [ key ] ) if len ( dicta [ key ] ) != 2 and dicta [ key ] [ valu - 2 ] [ 1 ] == dicta [ key ] [ valu - 3 ] [ 1 ] : print ( " ? " ) else : print ( " { } ▁ { } " . format ( dicta [ key ] [ valu - 1 ] [ 0 ] , dicta [ key ] [ valu - 2 ] [ 0 ] ) ) NEW_LINE


n , m = list ( map ( int , input ( ) . split ( ) ) ) d = { } for i in range ( 1 , m + 1 ) : d [ i ] = [ ] for i in range ( n ) : a , b , c = input ( ) . split ( ) a = str ( a ) b = int ( b ) c = int ( c ) d [ b ] . append ( [ c , a ] ) for i in range ( 1 , m + 1 ) : a = d [ i ] a . sort ( reverse = True ) if len ( a ) > 2 and a [ 1 ] [ 0 ] == a [ 2 ] [ 0 ] : print ( " ? " ) else : print ( a [ 0 ] [ 1 ] , a [ 1 ] [ 1 ] ) NEW_LINE


from sys import stdin , stdouta , b = map ( int , stdin . readline ( ) . split ( ) ) d = { } for i in range ( 1 , b + 1 ) : d [ i ] = [ ] for _ in " ▁ " * a : x , y , z = stdin . readline ( ) . split ( ) y = int ( y ) ; z = int ( z ) d [ y ] . append ( [ z , x ] ) ans = ' ' for i in d : d [ i ] . sort ( reverse = True ) if len ( d [ i ] ) > 2 and d [ i ] [ 1 ] [ 0 ] == d [ i ] [ 2 ] [ 0 ] : ans += ' ? ' else : ans += d [ i ] [ 0 ] [ 1 ] + ' ▁ ' + d [ i ] [ 1 ] [ 1 ] ans += ' \n ' stdout . write ( ans ) NEW_LINE


a , b = map ( int , input ( ) . split ( ) ) d = { } for i in range ( a ) : f = list ( input ( ) . split ( ) ) if int ( f [ 1 ] ) in d : d [ int ( f [ 1 ] ) ] . append ( ( int ( f [ 2 ] ) , f [ 0 ] ) ) else : d [ int ( f [ 1 ] ) ] = [ ( int ( f [ 2 ] ) , f [ 0 ] ) ] for i in d : d [ i ] . sort ( ) d [ i ] . reverse ( ) for i in range ( 1 , b + 1 ) : if len ( d [ i ] ) > 2 and d [ i ] [ 2 ] [ 0 ] == d [ i ] [ 1 ] [ 0 ] : print ( ' ? ' ) else : print ( d [ i ] [ 0 ] [ 1 ] , d [ i ] [ 1 ] [ 1 ] ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . math . * ; import java . awt . image . ConvolveOp ; import java . io . * ; import java . text . DecimalFormat ; import java . lang . Math ; import java . lang . reflect . Array ; import java . io . BufferedOutputStream ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigDecimal ; import java . util . * ; public class Codeforces { public static PrintWriter out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ; static long MOD = ( long ) ( 1e9 + 7 ) ; static FastReader sc = new FastReader ( ) ; static int pInf = Integer . MAX_VALUE ; static int nInf = Integer . MIN_VALUE ; public static void main ( String [ ] args ) { int test = 1 ;


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; int e = sc . nextInt ( ) ; int f = sc . nextInt ( ) ; int g = sc . nextInt ( ) ; int h = sc . nextInt ( ) ; int a1 = ( b * c ) / g ; int a2 = d * e ; int a3 = f / h ; int ans1 = Math . min ( a1 , a2 ) ; int ans = Math . min ( ans1 , a3 ) ; System . out . println ( ans / a ) ; } }

n , k , l , c , d , p , nl , np = map ( int , input ( ) . split ( ) ) x = min ( c * d , ( k * l ) // nl , p // np ) print ( x // n ) NEW_LINE


n , k , l , c , d , p , nl , np = map ( int , input ( ) . split ( ) ) a = k * lx = a // nly = c * dz = p // npprint ( min ( x , y , z ) // n ) NEW_LINE


n , k , l , c , d , p , nl , np = map ( int , input ( ) . split ( ) ) NEW_LINE


n , k , l , c , d , p , a , b = map ( int , input ( ) . split ( ) ) print ( min ( k * l // a , c * d , p // b ) // n ) NEW_LINE


import java . util . Scanner ;   public class A151 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ;   int n = scanner . nextInt ( ) , k = scanner . nextInt ( ) , l = scanner . nextInt ( ) , c = scanner . nextInt ( ) , d = scanner . nextInt ( ) , p = scanner . nextInt ( ) , nl = scanner . nextInt ( ) , np = scanner . nextInt ( ) ;   int millDrToast = k * l / nl , limesToast = c * d , saltToast = p / np ; System . out . println ( ( Math . min ( millDrToast , Math . min ( limesToast , saltToast ) ) ) / n ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   public class experiment { static int M = 1_000_000_007 ; static int INF = Integer . MAX_VALUE ; static final FastScanner fs = new FastScanner ( ) ;


import java . util . * ; import java . lang . * ; import java . io . * ; import java . awt . Point ;

n = int ( input ( ) ) g = [ [ ] for i in range ( n ) ] for i in range ( n - 1 ) : u , v = [ int ( i ) - 1 for i in input ( ) . split ( ) ] g [ u ] . append ( v ) g [ v ] . append ( u )   leaf = [ len ( i ) == 1 for i in g ] root = - 1 mx = n - 1 for i in range ( n ) : if leaf [ i ] : root = i leafs = 0 for j in g [ i ] : if leaf [ j ] : leafs += 1 if leafs > 1 : mx -= leafs - 1   stack = [ ( root , - 1 , 0 ) ] even = Truewhile len ( stack ) > 0 : i , j , d = stack . pop ( ) if leaf [ i ] and d % 2 == 1 : even = False break for k in g [ i ] : if k != j : stack . append ( ( k , i , d + 1 ) ) mn = 1 if even else 3   print ( mn , mx ) NEW_LINE


from types import GeneratorTypedef bootstrap ( f , stack = [ ] ) : def wrappedfunc ( * args , ** kwargs ) : if stack : return f ( * args , ** kwargs ) else : to = f ( * args , ** kwargs ) while True : if type ( to ) is GeneratorType : stack . append ( to ) to = next ( to ) else : stack . pop ( ) if not stack : break to = stack [ - 1 ] . send ( to ) return to return wrappedfunc   def main ( ) : NEW_LINE


from collections import defaultdict , dequefrom sys import * input = stdin . readline   n = int ( input ( ) ) graph = defaultdict ( list ) deg = [ 0 ] * nfor _ in range ( n - 1 ) : a , b = map ( int , input ( ) . split ( ) ) graph [ a - 1 ] . append ( b - 1 ) graph [ b - 1 ] . append ( a - 1 ) deg [ a - 1 ] += 1 deg [ b - 1 ] += 1   childLeaves = defaultdict ( int ) idx = 0 for i in range ( n ) : if deg [ i ] == 1 : idx = i childLeaves [ graph [ i ] [ 0 ] ] += 1   mAx = n - 1 + ( len ( childLeaves ) ) - sum ( childLeaves . values ( ) )   dis = defaultdict ( int ) dis [ idx ] = 0 stack = deque ( ) stack . append ( idx ) visited = [ 0 ] * nvisited [ idx ] = 1 mIn = 1   while stack : node = stack . pop ( ) if not visited [ node ] : visited [ node ] = 1 for i in graph [ node ] : if not visited [ i ] : dis [ i ] = dis [ node ] + 1 stack . append ( i ) if deg [ i ] == 1 and dis [ i ] % 2 : mIn = 3   print ( mIn , mAx ) NEW_LINE


import java . io . * ; import java . util . * ; public class Main { public static PrintWriter out ; public static ArrayList < Integer > [ ] adjacencyList ; public static void main ( String [ ] args ) { MyScanner sc = new MyScanner ( ) ; out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ; int n = sc . nextInt ( ) ; adjacencyList = new ArrayList [ n ] ; for ( int i = 0 ; i < n ; i ++ ) adjacencyList [ i ] = new ArrayList < > ( ) ; for ( int i = 0 ; i < n - 1 ; i ++ ) { int u = sc . nextInt ( ) , v = sc . nextInt ( ) ; u -- ; v -- ; adjacencyList [ u ] . add ( v ) ; adjacencyList [ v ] . add ( u ) ; } int minn = 1 , maxx = n - 1 ; int root = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( adjacencyList [ i ] . size ( ) == 1 ) { root = i ; break ; } } if ( dfs ( root , root , 0 ) ) minn = 3 ; int c = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( adjacencyList [ i ] . size ( ) == 1 ) continue ; c = 0 ; for ( int j : adjacencyList [ i ] ) { if ( adjacencyList [ j ] . size ( ) == 1 ) c ++ ; } if ( c > 0 ) maxx -= ( c - 1 ) ; } out . println ( minn + " ▁ " + maxx ) ; out . close ( ) ; } public static boolean dfs ( int root , int prnt , int ht ) { boolean flg = false ; boolean haschild = false ; for ( int i = 0 ; i < adjacencyList [ root ] . size ( ) ; i ++ ) { if ( adjacencyList [ root ] . get ( i ) == prnt ) continue ; haschild = true ; flg = flg || dfs ( adjacencyList [ root ] . get ( i ) , root , ht + 1 ) ; } if ( ! haschild ) flg = flg || ( ht % 2 == 1 ) ; return flg ; }


import java . util . * ; import java . io . * ; public class Mamo { static long mod = 998244353 ; static Reader in = new Reader ( ) ; static List < Integer > G [ ] ; static boolean B = true ; static StringBuilder Sd = new StringBuilder ( ) ; public static void main ( String [ ] args ) {


import java . io . * ; import java . util . * ;   public class Main { private static int root ( int [ ] parentIds , int c ) { while ( c != parentIds [ c ] ) { parentIds [ c ] = parentIds [ parentIds [ c ] ] ; c = parentIds [ c ] ; } return c ; } private static boolean union ( int [ ] parentIds , int [ ] groupSizes , int a , int b ) { int rootA = root ( parentIds , a ) ; int rootB = root ( parentIds , b ) ; if ( rootA == rootB ) { return false ; } if ( groupSizes [ rootA ] < groupSizes [ rootB ] ) { parentIds [ rootA ] = rootB ; groupSizes [ rootB ] += groupSizes [ rootA ] ; } else { parentIds [ rootB ] = rootA ; groupSizes [ rootA ] += groupSizes [ rootB ] ; } return true ; } public static void main ( String [ ] args ) throws IOException {

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) par = [ ] for i in range ( n ) : if a [ i ] == i + 1 : par . append ( i ) v = [ False for i in range ( n ) ] for i in par : v [ i ] = Trueccl = [ ] for i in range ( n ) : if v [ i ] : continue s = [ i ] v [ i ] = True p = set ( s ) t = True while s and t : x = s . pop ( ) j = a [ x ] - 1 if j in p : ccl . append ( j ) t = False else : s . append ( j ) p . add ( j ) if v [ j ] : t = False else : v [ j ] = Trueif len ( par ) == 0 : print ( len ( ccl ) ) c = ccl [ 0 ] a [ c ] = c + 1 for i in range ( 1 , len ( ccl ) ) : a [ ccl [ i ] ] = c + 1 print ( * a ) else : print ( len ( ccl ) + len ( par ) - 1 ) c = par [ 0 ] for i in range ( 1 , len ( par ) ) : a [ par [ i ] ] = c + 1 for i in range ( len ( ccl ) ) : a [ ccl [ i ] ] = c + 1 print ( * a ) NEW_LINE


import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastScanner in = new FastScanner ( System . in ) ; PrintWriter out = new PrintWriter ( System . out ) ; new Main ( ) . run ( in , out ) ; out . close ( ) ; }   int N ; List < Integer > [ ] adj ; void run ( FastScanner in , PrintWriter out ) {   N = in . nextInt ( ) ;   LinkedList < Integer > freeSet = new LinkedList < > ( ) ; int [ ] a = new int [ N + 1 ] ; UnionFind uf = new UnionFind ( N ) ; int count = 0 ;   int root = - 1 ; for ( int u = 1 ; u <= N ; u ++ ) { int v = in . nextInt ( ) ; a [ u ] = v ;   if ( uf . findParent ( u ) != uf . findParent ( v ) ) { uf . merge ( u , v ) ; continue ; }   if ( u == v && root == - 1 ) { root = u ; continue ; }   count ++ ;


import java . util . * ; import java . io . * ; public class A { static FastReader in = new FastReader ( ) ; static final Random random = new Random ( ) ; static long mod = 1000000007L ; static HashMap < Integer , Integer > map = new HashMap < > ( ) ;   public static void main ( String args [ ] ) throws IOException { int t = in . nextInt ( ) ; StringBuilder res = new StringBuilder ( ) ; loop : while ( t -- > 0 ) { StringBuilder temp = new StringBuilder ( ) ; Queue < Integer > q = new LinkedList < > ( ) ; int n = in . nextInt ( ) ; int k = in . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int x = in . nextInt ( ) ; if ( x % 2 != 0 ) { q . add ( i + 1 ) ; } } if ( q . size ( ) < k ) { res . append ( " NO \n " ) ; continue loop ; } k -- ; while ( k -- > 0 ) { temp . append ( q . poll ( ) + " ▁ " ) ; } if ( q . size ( ) % 2 != 0 ) { temp . append ( n ) ; res . append ( " YES \n " ) ;

import sys , math , itertoolsfrom collections import Counter , deque , defaultdictfrom bisect import bisect_left , bisect_right from heapq import heappop , heappush , heapifymod = 10 ** 9 + 7 INF = float ( ' inf ' ) def inp ( ) : return int ( sys . stdin . readline ( ) ) def inpl ( ) : return list ( map ( int , sys . stdin . readline ( ) . split ( ) ) ) def inpl_1 ( ) : return list ( map ( lambda x : int ( x ) - 1 , sys . stdin . readline ( ) . split ( ) ) ) def inps ( ) : return sys . stdin . readline ( ) def inpsl ( x ) : tmp = sys . stdin . readline ( ) ; return list ( tmp [ : x ] ) def err ( x ) : print ( x ) ; exit ( )   for _ in range ( inp ( ) ) : n , k = inpl ( ) a = inpl ( ) cnt = 0 for i in range ( n ) : NEW_LINE


for _ in range ( int ( input ( ) ) ) : n , k = map ( int , input ( ) . split ( ) ) ; ans = [ ] ; idx = 0 ; summ = 0 arr = list ( map ( int , input ( ) . split ( ) ) ) for i in range ( n ) : summ += arr [ i ] if summ % 2 == 1 and len ( ans ) != k - 1 : ans . append ( i + 1 ) ; summ = 0 ; if summ % 2 == 1 and len ( ans ) == k - 1 : print ( " YES " ) ; ans . append ( n ) ; print ( * ans ) else : print ( " NO " ) NEW_LINE


q = int ( input ( ) ) while q > 0 : q -= 1 n_k = input ( ) n_k = n_k . split ( ) n = int ( n_k [ 0 ] ) k = int ( n_k [ 1 ] ) s = 0 list_a = input ( ) list_a = list_a . split ( " ▁ " ) for i in range ( n ) : list_a [ i ] = int ( list_a [ i ] ) s = s + list_a [ i ] if ( s % 2 == 0 and k % 2 != 0 ) or ( s % 2 != 0 and k % 2 == 0 ) : print ( " NO " ) continue border = [ ] temp_sum = 0 if k != 1 : for i in range ( n ) : temp_sum = temp_sum + list_a [ i ] if temp_sum % 2 != 0 : border . append ( i + 1 ) temp_sum = 0 if len ( border ) == k - 1 : break temp_len = len ( border ) if temp_len == k - 1 : print ( " YES " ) else : print ( " NO " ) continue for i in range ( temp_len ) : print ( border [ i ] , end = " ▁ " ) print ( n ) else : print ( " YES " ) print ( n ) NEW_LINE


t = int ( input ( ) ) for _ in range ( t ) : n , k = map ( int , input ( ) . split ( ) ) lst = list ( map ( int , input ( ) . split ( ) ) ) [ : n ] r = 0 ind = [ ] for i in range ( n ) : if lst [ i ] % 2 != 0 : r = r + 1 ind . append ( i + 1 ) if r == k : print ( " YES " ) for i in range ( k - 1 ) : print ( ind [ i ] , end = " ▁ " ) print ( n ) elif r >= k : if ( r - ( k - 1 ) ) % 2 != 0 : print ( " YES " ) for i in range ( k - 1 ) : print ( ind [ i ] , end = " ▁ " ) print ( n ) else : print ( " NO " ) else : print ( " NO " ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ; import java . util . * ; import java . math . * ; public class er10a {


import java . util . * ; import java . util . * ; import java . io . BufferedReader ; import java . io . FileNotFoundException ; import java . io . FileReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . * ;   public class oddz { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] a = sc . nextArr ( n ) ; int c1 = 0 ; for ( int i = 0 ; i < a . length ; i ++ ) { if ( a [ i ] % 2 != 0 ) { c1 ++ ; } } if ( ( ( c1 % 2 == 0 && k % 2 == 0 ) || ( c1 % 2 != 0 && k % 2 != 0 ) ) && c1 >= k ) { System . out . println ( " YES " ) ; c1 = 0 ; for ( int i = 0 ; i < a . length ; i ++ ) { if ( ( c1 + 1 ) == k ) { System . out . print ( a . length ) ; break ; } else if ( a [ i ] % 2 != 0 && ( c1 + 1 ) != k ) { System . out . print ( ( i + 1 ) + " ▁ " ) ; c1 ++ ; }   } System . out . println ( ) ;   }   else { System . out . println ( " NO " ) ; } }   pw . flush ( ) ; pw . close ( ) ; }   public static int findMaxSumSubarray ( int [ ] arr , int k ) { int maxValue = Integer . MIN_VALUE ; int currentRunningSum = 0 ; for ( int i = 0 ; i < arr . length ; i ++ ) { currentRunningSum += arr [ i ] ; if ( i >= k - 1 ) { maxValue = Math . max ( maxValue , currentRunningSum ) ; currentRunningSum -= arr [ i - ( k - 1 ) ] ;


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . List ; import java . util . Scanner ; import java . util . StringTokenizer ;   public class B { public static void main ( String [ ] args ) { RealScanner sc = new RealScanner ( ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n , k ; n = sc . nextInt ( ) ; k = sc . nextInt ( ) ; List < Integer > l = new ArrayList < > ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { int val = sc . nextInt ( ) ; if ( val % 2 != 0 ) { l . add ( i ) ; } } if ( l . size ( ) >= k && ( l . size ( ) - k ) % 2 == 0 ) { System . out . println ( " YES " ) ; for ( int i = 0 ; i < k - 1 ; i ++ ) { System . out . print ( l . get ( i ) + " ▁ " ) ; } System . out . println ( n ) ; } else { System . out . println ( " NO " ) ; } } } static class RealScanner { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringTokenizer st = new StringTokenizer ( " " ) ; String next ( ) { while ( ! st . hasMoreTokens ( ) ) try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } } }


import java . util . * ;   public class Stairs {   public static void main ( String [ ] args ) {

arr = [ 1 ] NEW_LINE for j in range ( 1 , 30 ) : arr . append ( arr [ - 1 ] + 2 ** j ) NEW_LINE new_arr = [ ] NEW_LINE for j in arr : new_arr . append ( ( j * ( j + 1 ) ) // 2 ) NEW_LINE for j in range ( 1 , len ( arr ) ) : new_arr [ j ] += new_arr [ j - 1 ]   import bisectt = int ( input ( ) ) NEW_LINE for i in range ( t ) : n = int ( input ( ) ) NEW_LINE x = bisect . bisect ( new_arr , n ) NEW_LINE print ( x )   NEW_LINE


for i in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE j = 0 NEW_LINE while n >= 0 : j += 1 NEW_LINE c = 2 ** j - 1 NEW_LINE n -= ( c * ( c + 1 ) ) // 2 NEW_LINE print ( j - 1 ) NEW_LINE


t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE sum1 = 0 NEW_LINE base = 1 NEW_LINE ans = 0 NEW_LINE while sum1 <= n : sum1 += ( base * ( base + 1 ) ) // 2 NEW_LINE base = ( base * 2 ) + 1 NEW_LINE ans += 1 NEW_LINE print ( ans - 1 ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE a = - 1 NEW_LINE x = 0 NEW_LINE while x <= n : a += 1 NEW_LINE k = 2 ** ( a + 1 ) - 1 NEW_LINE x += k * ( k + 1 ) // 2 NEW_LINE print ( a ) NEW_LINE


def fun ( x ) : i = 1 ; ct = 0 NEW_LINE while i < 32 and x > 0 : x -= ( 2 ** ( i - 1 ) ) * ( ( 2 ** i ) - 1 ) NEW_LINE i += 1 ; NEW_LINE ct += 1 NEW_LINE return ct if x == 0 else ct - 1 NEW_LINE for _ in range ( int ( input ( ) ) ) : x = int ( input ( ) )   print ( fun ( x ) ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner scn = new Scanner ( System . in ) ; int t = scn . nextInt ( ) ; while ( t -- > 0 ) { long n = scn . nextLong ( ) ; long x = 1 ; long ans = 0 ; long stair = 1 ; while ( n - x >= 0 ) { n = n - x ; ans ++ ; stair = stair * 2 + 1 ; x = stair * ( stair + 1 ) / 2 ; } System . out . println ( ans ) ; } } }


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int q = scan . nextInt ( ) ; while ( q > 0 ) { int n = scan . nextInt ( ) ; q -- ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = scan . nextInt ( ) ; } int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { sum += a [ i ] ; } if ( sum % n == 0 ) { System . out . println ( sum / n ) ; } else { System . out . println ( sum / n + 1 ) ; } } } }

for i in range ( int ( input ( ) ) ) : n = int ( input ( ) ) items = list ( map ( int , input ( ) . split ( " ▁ " ) ) ) a = sum ( items ) ans = a // n if a % n != 0 : ans += 1 print ( ans ) NEW_LINE


t = int ( input ( ) ) for _ in range ( t ) : n = int ( input ( ) ) x = list ( map ( int , input ( ) . split ( ) ) ) s = sum ( x ) if s % n == 0 : k = s // n else : k = s // n + 1 print ( k ) NEW_LINE


import mathfor t in range ( int ( input ( ) ) ) : n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) print ( math . ceil ( sum ( a ) / n ) ) NEW_LINE


import java . util . * ;   public class Main {   public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = Integer . valueOf ( scanner . nextLine ( ) ) ; while ( t -- > 0 ) { long n = scanner . nextLong ( ) ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { sum += scanner . nextLong ( ) ; } System . out . println ( sum / n + Math . min ( 1 , sum % n ) ) ; } } }


import java . io . * ; import java . math . * ; import java . util . * ;        public class Main {   private static int dx [ ] = { 1 , 0 , - 1 , 0 } ; private static int dy [ ] = { 0 , - 1 , 0 , 1 } ; private static int dx1 [ ] = { 1 , 1 , 0 , - 1 , - 1 , - 1 , 0 , 1 } ; private static int dy1 [ ] = { 0 , - 1 , - 1 , - 1 , 0 , 1 , 1 , 1 } ;   private static final long INF = ( long ) Math . pow ( 10 , 16 ) ; private static final int INT_INF = Integer . MAX_VALUE ; private static final long NEG_INF = Long . MIN_VALUE ; private static final int NEG_INT_INF = Integer . MIN_VALUE ; private static final double EPSILON = 1e-10 ;   private static final long MAX = ( long ) 1e12 ; private static final long MOD = 1000000007 ;   private static final int MAXN = 200001 ; private static final int MAXA = 1000004 ; private static final int MAXLOG = 22 ; private static final double PI = Math . acos ( - 1 ) ; public static void main ( String [ ] args ) throws IOException {   InputReader in = new InputReader ( System . in ) ;


import java . util . * ; import java . io . * ; public class A { public static FastReader sc = new FastReader ( ) ; public static PrintWriter out = new PrintWriter ( System . out ) ; public static void taskSolver ( ) { int n = sc . nextInt ( ) ; long sum = 0 ; Integer arr [ ] = new Integer [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; sum += arr [ i ] ; } out . println ( ( sum + n - 1 ) / n ) ; } public static void main ( String args [ ] ) throws java . lang . Exception { int t = sc . nextInt ( ) ; while ( t -- > 0 ) taskSolver ( ) ; out . close ( ) ; } static class FastReader { BufferedReader br ; StringTokenizer st ; public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; } String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; } int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; } long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }


import java . io . * ; import java . math . * ; import java . util . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastReader scan = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; Task solver = new Task ( ) ; ans = new StringBuilder ( ) ; int T = 1 ; for ( int tt = 0 ; tt < T ; tt ++ ) solver . solve ( tt , scan , out ) ; out . close ( ) ; }   static StringBuilder ans ;   static class Task { public void solve ( int testNumber , FastReader scan , PrintWriter out ) { int q = scan . nextInt ( ) ; while ( q -- > 0 ) { int n = scan . nextInt ( ) ; double s = 0 ; for ( int i = 0 ; i < n ; i ++ ) s += scan . nextDouble ( ) ; out . println ( ( int ) Math . ceil ( s / n ) ) ; } } }   static class FastReader { BufferedReader br ; StringTokenizer st ;   public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   public FastReader ( String s ) throws FileNotFoundException { br = new BufferedReader ( new FileReader ( new File ( s ) ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } }


import java . io . PrintWriter ; import java . util . * ; import java . lang . * ; public class Main { static int po ( int n ) { int a = 2 ; int res = 1 ; while ( n > 0 ) { if ( n % 2 == 0 ) { res *= a ; n -- ; } else { a *= a ; n /= 2 ; } } return res ; } static long f ( long num ) { HashSet < Long > h = new HashSet < > ( ) ; int res = 0 , flag = 1 ; while ( num > 0 ) { long n = num % 10 ; if ( ! h . contains ( n ) ) { h . add ( n ) ; num /= 10 ; res += n ; } else { flag = 0 ; break ; } } if ( flag == 0 ) { return - 1 ; } return res ; } public static void main ( String [ ] args ) { PrintWriter out1 = new PrintWriter ( System . out ) ; Scanner sc = new Scanner ( System . in ) ;

n , m = map ( int , input ( ) . split ( ) ) if n == 1 : print ( 1 ) else : print ( m - 1 if m - 1 >= n - m else m + 1 ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) if n == 1 : print ( 1 ) elif m - 1 < n - m : print ( m + 1 ) else : print ( m - 1 ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) a = min ( m + 1 , n ) b = max ( m - 1 , 1 ) a = ( n - a + 1 ) - ( m == n ) b = b - ( m == 1 ) if b >= a : print ( max ( m - 1 , 1 ) ) else : print ( min ( m + 1 , n ) ) NEW_LINE


arr = list ( map ( int , input ( ) . split ( ) ) ) n = arr [ 0 ] m = arr [ 1 ] if ( n == 1 ) : print ( 1 ) elif ( n % 2 == 0 ) : if ( m == n / 2 ) : print ( m + 1 ) elif ( m == ( n / 2 + 1 ) ) : print ( m - 1 ) elif ( m < ( n / 2 ) ) : print ( m + 1 ) else : print ( m - 1 ) else : k = ( n + 1 ) / 2 if ( m == k ) : print ( m - 1 ) elif ( m < k ) : print ( m + 1 ) else : print ( m - 1 ) NEW_LINE


import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { try ( Scanner input = new Scanner ( System . in ) ) { long n = input . nextLong ( ) ; long m = input . nextLong ( ) ; long a = 0 ; long largestInterval = getLargestInterval ( n , m ) ; if ( largestInterval == 0 ) { a = 1 ; } else if ( largestInterval == m - 1 ) { a = m - 1 ; } else { a = m + 1 ; } System . out . println ( a ) ; } }   private static long getLargestInterval ( long n , long m ) { return Math . max ( n - m , m - 1 ) ; } }


import java . util . Scanner ;   public class P570B { public static void main ( String [ ] args ) {   Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int m = s . nextInt ( ) ; if ( n == 1 ) { System . out . println ( 1 ) ; } else { if ( n - m > m - 1 ) { System . out . println ( m + 1 ) ; } else { System . out . println ( m - 1 ) ; } }   }   }


import java . util . * ; import java . math . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int x = sc . nextInt ( ) ; int h = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int c = 0 ; while ( h % 10 != 7 && m % 10 != 7 ) { c ++ ; m -= x ; if ( m < 0 ) { m += 60 ; h -= 1 ; } if ( h < 0 ) h = 23 ; } System . out . println ( c ) ; } }

import datetime   n = int ( input ( ) ) a , b = input ( ) . split ( )   x = datetime . timedelta ( hours = int ( a ) , minutes = int ( b ) ) c = 0 while '7' not in str ( x ) : x -= datetime . timedelta ( hours = 0 , minutes = n ) c += 1   print ( c ) NEW_LINE


def decrease ( h , m , x ) : if m >= x : m -= x else : m = 60 - ( x - m ) if h == 0 : h = 23 elif h <= 1 : h = 24 - ( h - 1 ) else : h -= 1 return [ h , m ]       def solve ( h , m , x ) : count = 0 v = [ 7 , 17 , 27 , 37 , 47 , 57 ] while True : if h in v or m in v : return count h , m = decrease ( h , m , x ) count += 1                                         def main ( ) : x = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) NEW_LINE


x = int ( input ( ) ) h , m = map ( int , input ( ) . split ( ) )   y = 0 while 1 : if str ( h ) . find ( '7' ) >= 0 or str ( m ) . find ( '7' ) >= 0 : break   y += 1 m -= x if m < 0 : h -= 1 m += 60 if h < 0 : h += 24   print ( y ) NEW_LINE


x = int ( input ( ) ) h , m = map ( int , input ( ) . split ( ) ) c = 0   if '7' in str ( h ) or '7' in str ( m ) : print ( 0 ) else : while True : if ( m - x ) >= 0 : m = m - x c = c + 1 else : m = 60 - ( abs ( m - x ) ) if h == 0 : h = 23 else : h = h - 1 c = c + 1 d = str ( h ) f = str ( m ) if '7' in d or '7' in f : break print ( c ) NEW_LINE


import java . util . Scanner ;   public class NewMain6 {   public static void main ( String [ ] args ) {


import java . util . * ; import java . util . stream . * ; public class Solution { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int x = scan . nextInt ( ) ; int hh = scan . nextInt ( ) ; int mm = scan . nextInt ( ) ; int result = 0 ; while ( ! happy ( hh , mm ) ) { if ( mm >= x ) { mm -= x ; } else { mm = 60 - ( x - mm ) ; if ( hh > 0 ) { hh -- ; } else { hh = 23 ; } } result ++ ; } System . out . println ( result ) ; } private static boolean happy ( Integer hh , Integer mm ) { return hh . toString ( ) . contains ( "7" ) || mm . toString ( ) . contains ( "7" ) ; } }


import java . util . * ;   public class Solution {    public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; int testCases = in . nextInt ( ) ; in . nextLine ( ) ; for ( int i = 0 ; i < testCases ; i ++ ) { int n = in . nextInt ( ) ; int k = in . nextInt ( ) ; in . nextLine ( ) ; int result = 0 ; if ( n < k ) { result = k - n ; } else { result = ( ( n - k ) % 2 == 0 ) ? 0 : 1 ; } System . out . println ( result ) ; } } }

t = int ( input ( ) ) for _ in range ( t ) : n , k = list ( map ( int , input ( ) . split ( ) ) ) if n <= k : print ( k - n ) else : if ( n + k ) % 2 == 0 : print ( 0 ) else : print ( 1 ) NEW_LINE


num_times = int ( input ( ) ) for i in range ( num_times ) : n , k = input ( ) . split ( ) n = int ( n ) k = int ( k ) if n % 2 == 0 : if k > n : print ( k - n ) elif k <= n and k % 2 == 0 : print ( 0 ) elif k <= n and k % 2 != 0 : print ( 1 ) elif n % 2 != 0 : if k > n : print ( k - n ) if k % 2 != 0 and k <= n : print ( 0 ) elif k % 2 == 0 and k <= n : print ( 1 )                         NEW_LINE


from sys import stdin , stdout   def main ( ) : for _ in range ( int ( stdin . readline ( ) ) ) : n , k = map ( int , stdin . readline ( ) . split ( ' ▁ ' ) ) if n <= k : stdout . write ( str ( k - n ) + ' \n ' ) else : stdout . write ( str ( ( n - k ) % 2 ) + ' \n ' )   if __name__ == " _ _ main _ _ " : main ( ) NEW_LINE


t = int ( input ( ) ) for i in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) if ( a < b ) : print ( b - a ) else : print ( ( a - b ) % 2 ) NEW_LINE


import java . util . * ; import java . io . * ; import java . lang . Math ;    public class A { public static void main ( String args [ ] ) { PrintWriter out = new PrintWriter ( System . out ) ; FastScanner fs = new FastScanner ( ) ; int t = fs . nextInt ( ) ; for ( int test_case = 1 ; test_case <= t ; test_case ++ ) { int n = fs . nextInt ( ) , k = fs . nextInt ( ) ; if ( n < k ) { System . out . println ( k - n ) ; } else { if ( k % 2 == 0 && n % 2 == 0 ) { System . out . println ( 0 ) ; } else if ( k % 2 == 1 && n % 2 == 1 ) { System . out . println ( 0 ) ; } else { System . out . println ( 1 ) ; } } } out . close ( ) ; } static class Pair implements Comparable < Pair > { int first , second ; public Pair ( int x , int y ) { first = x ; second = y ; } public int compareTo ( Pair x ) { if ( this . first < x . first ) return - 1 ; if ( this . first == x . first ) return this . second < x . second ? - 1 : ( this . second == x . second ? 0 : 1 ) ; return 1 ; } } static class RangeMin { long logs [ ] , st [ ] [ ] ; int N , K ; public RangeMin ( int n ) { N = n ; K = ( int ) ( ( double ) ( Math . log10 ( ( double ) n ) / ( double ) Math . log10 ( ( double ) 2 ) ) ) ; st = new long [ N + 2 ] [ K + 2 ] ; logs = new long [ N + 2 ] ; } void init ( ArrayList < Integer > A ) { for ( int i = 0 ; i < N ; i ++ ) { Arrays . fill ( st [ i ] , ( long ) 1e18 ) ; st [ i ] [ 0 ] = ( long ) A . get ( i ) ; }


import java . util . Scanner ;   public class A1401 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int T = in . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { int N = in . nextInt ( ) ; int K = in . nextInt ( ) ; int answer = 0 ; if ( ( N % 2 == 0 ) != ( K % 2 == 0 ) ) { N ++ ; answer ++ ; } answer += Math . max ( 0 , K - N ) ; System . out . println ( answer ) ; } }   }


import java . util . Scanner ; public class CodeForces { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; if ( n > m ) { System . out . println ( ( n - m ) % 2 ) ; } else { System . out . println ( m - n ) ; } } } }


import java . util . * ;   public class Main {   public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; String alph = " abcdefghijklmnopqrstuvwxyz " ; int t = in . nextInt ( ) ;

t = int ( input ( ) ) for j in range ( t ) : n , a , b = map ( int , input ( ) . split ( ) ) x , res = ord ( ' a ' ) , ' ' for i in range ( a - b + 1 ) : res += chr ( x ) for i in range ( b - 1 ) : x += 1 res += chr ( x ) NEW_LINE


for i in range ( int ( input ( ) ) ) : n , a , b = map ( int , input ( ) . split ( ) ) s1 = ' qwertyuiopasdfghjklzxcvbnm ' s2 = s1 [ : b ] s3 = s2 * ( n // b ) + s2 [ : n % b ] print ( s3 ) NEW_LINE


from math import ceil   t = int ( input ( ) )   l = ' zyxwvutsrqponmlkjihgfedcba ' for i in range ( t ) : n , a , b = map ( int , input ( ) . split ( ) )   x = l [ : b ] x = ( x * ceil ( a / b ) ) [ : a ] x = ( x * ceil ( n / a ) ) [ : n ]   print ( x ) NEW_LINE


for i in range ( int ( input ( ) ) ) : n , a , b = map ( int , input ( ) . split ( ) ) s = ' abcdefghijklmnopqrstuvwxyz ' res = s [ 0 : b ] * ( n // b ) c = n - len ( res ) print ( res + s [ 0 : c ] ) NEW_LINE


import java . util . * ;   public class Try { public static void main ( String args [ ] ) { Scanner br = new Scanner ( System . in ) ; int t = br . nextInt ( ) ; while ( t -- > 0 ) { int n = br . nextInt ( ) ; int a = br . nextInt ( ) ; int b = br . nextInt ( ) ; int ch = 96 ; while ( n -- != 0 ) { ++ ch ; System . out . print ( ( char ) ch ) ; if ( 96 + b == ch ) ch = 96 ; } System . out . println ( ) ; } } }


import java . util . * ; public class P2 {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; String s = " abcdefghijklmnopqrstuvwxyz " ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; if ( a == b ) { String m = " " ; for ( int j = 0 ; j < n ; j ++ ) { m += s . charAt ( j % 26 ) ; } System . out . println ( m ) ; } else if ( n == a ) { String f = " " ; for ( int i = 0 ; i < n - b + 1 ; i ++ ) { f += ' a ' ; } f += s . substring ( 1 , b ) ; System . out . println ( f ) ; } else if ( b == 1 ) { String f = " " ; for ( int i = 0 ; i < n ; i ++ ) { f += ' a ' ; } System . out . println ( f ) ; } else { String m = " " ; for ( int j = 0 ; j < a ; j ++ ) { m += s . charAt ( j % 26 ) ; } String ret = " " ; for ( int i = 0 ; i < a - b + 1 ; i ++ ) { ret += ' a ' ; } ret += m . substring ( 1 , b ) ;   String f = ret ; for ( int i = 0 ; i < n - ret . length ( ) ; i ++ ) { f += ret . charAt ( i % a ) ; } System . out . println ( f ) ;   } } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ;   public class CF1335B { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; while ( t -- > 0 ) { int [ ] nab = Arrays . stream ( br . readLine ( ) . split ( " \\ s + " ) ) . mapToInt ( Integer :: parseInt ) . toArray ( ) ; int i = 0 ; while ( i < nab [ 0 ] ) { System . out . print ( ( char ) ( ' a ' + ( i ++ % nab [ 2 ] ) ) ) ; } System . out . println ( ) ; }   } }


import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; StringBuilder SB = new StringBuilder ( ) ; int n = in . nextInt ( ) ; if ( n % 2 == 0 ) { int k = n / 2 ; System . out . println ( ( k ) * n ) ;   for ( int i = 1 ; i <= k ; i ++ ) {   for ( int j = 1 ; j <= k ; j ++ ) { SB . append ( " C . " ) ;   } SB . append ( " \r \n " ) ;    for ( int j = 1 ; j <= k ; j ++ ) { SB . append ( " . C " ) ; } SB . append ( " \r \n " ) ;   } } else { int k = n / 2 ; System . out . println ( ( k + 1 ) * ( ( k ) + 1 ) + ( k ) * ( k ) ) ; for ( int i = 1 ; i <= k ; i ++ ) { for ( int j = 1 ; j <= k ; j ++ ) { SB . append ( " C . " ) ; } SB . append ( " C " ) ; SB . append ( " \r \n " ) ; for ( int j = 1 ; j <= k ; j ++ ) { SB . append ( " . C " ) ; } SB . append ( " . " ) ; SB . append ( " \r \n " ) ; }   for ( int j = 1 ; j <= k ; j ++ ) { SB . append ( " C . " ) ; } SB . append ( " C " ) ; SB . append ( " \r \n " ) ; } System . out . println ( SB ) ; } }

n = int ( input ( ) )     if ( n % 2 ) != 0 : print ( ( n * n // 2 ) + 1 ) else : print ( n * n // 2 ) for i in range ( n ) : rep = ' ' for j in range ( n ) : if i % 2 == 0 : if j % 2 == 0 : rep += ' C ' else : rep += ' . ' else : if j % 2 != 0 : rep += ' C ' else : rep += ' . ' print ( rep ) NEW_LINE


n = int ( input ( ) ) if n % 2 == 0 : print ( n ** 2 // 2 ) for i in range ( n ) : if i % 2 == 0 : print ( ' C . ' * ( n // 2 ) ) else : print ( ' . C ' * ( n // 2 ) ) else : print ( n ** 2 // 2 + 1 ) for i in range ( n ) : if i % 2 == 0 : print ( ' C . ' * ( n // 2 ) + ' C ' ) else : print ( ' . C ' * ( n // 2 ) + ' . ' ) NEW_LINE


import sysfrom math import ceil   def main ( ) : n = int ( sys . stdin . read ( ) . strip ( ) ) t = int ( ceil ( n / 2 ) ) return t * n - n % t , ' \n ' . join ( ' ' . join ( ' . C ' [ not ( i + j ) % 2 ] for j in range ( n ) ) for i in range ( n ) ) print ( * main ( ) , sep = ' \n ' ) NEW_LINE


def main_function ( ) : n = int ( input ( ) ) output_list = [ ] count = 0 for i in range ( n ) : lis = [ ] if not i % 2 : for j in range ( n ) : if not j % 2 : lis . append ( " C " ) count += 1 else : lis . append ( " . " ) else : for j in range ( n ) : if not j % 2 : lis . append ( " . " ) else : lis . append ( " C " ) count += 1 s = " " . join ( lis ) output_list . append ( s ) return str ( count ) + " \n " + " \n " . join ( output_list )           print ( main_function ( ) ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; System . out . println ( ( n * n + 1 ) / 2 ) ; for ( int i = 0 ; i < n ; i ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( i + j ) % 2 == 0 ) sb . append ( " C " ) ; else sb . append ( " . " ) ; } System . out . println ( sb ) ; } in . close ( ) ; } }


import java . util . Scanner ;   public class Main { public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; while ( in . hasNext ( ) ) { int n = in . nextInt ( ) ; int code = ( n * n + 1 ) / 2 ; System . out . println ( code ) ; for ( int i = 0 ; i < n ; i ++ ) { StringBuffer stringBuffer = new StringBuffer ( ) ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( i + j + 2 ) % 2 == 0 ) stringBuffer . append ( ' C ' ) ; else stringBuffer . append ( ' . ' ) ; } System . out . println ( stringBuffer ) ; } } }   }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Codechef { public static void main ( String [ ] args ) throws java . lang . Exception {


import java . math . BigInteger ; import java . util . * ; import java . lang . * ; import java . util . Arrays ;      public class geek {    public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; try {        StringBuffer sb = new StringBuffer ( ) ; int n = s . nextInt ( ) ;   int j = 0 , ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { j = 0 ; if ( i % 2 == 0 ) {   while ( j < n ) { sb . append ( " C " ) ; ans ++ ; j ++ ; if ( j < n ) { sb . append ( " . " ) ; j ++ ; } } } else {    while ( j < n ) { sb . append ( " . " ) ; j ++ ; if ( j < n ) { sb . append ( " C " ) ; ans ++ ; j ++ ; } } } sb . append ( " \n " ) ;   } System . out . println ( ans + " \n " + sb ) ;


import java . util . * ; import java . io . * ; import java . math . * ; public class Solution { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int n = Integer . parseInt ( st . nextToken ( ) ) ; long k = Long . parseLong ( st . nextToken ( ) ) ; if ( n == 1 ) out . println ( "1" ) ; else { long [ ] tab = new long [ n ] ; tab [ 0 ] = ( long ) 0 ; tab [ 1 ] = ( long ) 0 ; for ( int i = 2 ; i < n ; i ++ ) {

n , k = map ( int , input ( ) . split ( ) ) a = [ 0 for i in range ( n + 1 ) ] a [ 0 ] , a [ 1 ] = 1 , 1 for i in range ( 2 , n + 1 ) : a [ i ] = a [ i - 1 ] + a [ i - 2 ] p = [ i + 1 for i in range ( n ) ] i = 0 while i < n : if k > a [ n - 1 - i ] : p [ i ] , p [ i + 1 ] = p [ i + 1 ] , p [ i ] k -= a [ n - 1 - i ] i += 2 else : i += 1 p = [ str ( i ) for i in p ] print ( ' ▁ ' . join ( p ) )   NEW_LINE


n , m = [ int ( x ) for x in input ( ) . split ( ) ] F = [ 1 , 1 ] for i in range ( 2 , n ) : F . append ( F [ - 1 ] + F [ - 2 ] ) perm = [ i + 1 for i in range ( n ) ] for i in range ( n ) : if m > F [ n - 1 - i ] : m -= F [ n - 1 - i ] perm [ i ] , perm [ i + 1 ] = perm [ i + 1 ] , perm [ i ] for k in perm : print ( k , end = ' ▁ ' ) NEW_LINE


n , k = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE


n , m = [ int ( x ) for x in input ( ) . split ( ) ] F = [ 1 , 1 ] for i in range ( 2 , n ) : F . append ( F [ - 1 ] + F [ - 2 ] ) perm = [ i + 1 for i in range ( n ) ] for i in range ( n ) : if m > F [ n - 1 - i ] : m -= F [ n - 1 - i ] perm [ i ] , perm [ i + 1 ] = perm [ i + 1 ] , perm [ i ] for k in perm : print ( k , end = ' ▁ ' )         NEW_LINE


import java . io . * ; import java . util . * ;   public class cf553B {   public static void main ( String [ ] args ) {


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayDeque ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . Objects ; import java . util . Random ; import java . util . StringTokenizer ; import java . util . TreeSet ;   public class Solution { static final int maxn = ( int ) 1e5 + 10 ; public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int tt = 1 ; while ( tt -- > 0 ) { int n = fs . nextInt ( ) ; long k = fs . nextLong ( ) ; long [ ] fib = new long [ n + 1 ] ; fib [ 0 ] = 1 ; fib [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) fib [ i ] = fib [ i - 1 ] + fib [ i - 2 ] ; int idx = 0 ; int [ ] res = new int [ n ] ; while ( idx < n ) { if ( k <= fib [ n - idx - 1 ] ) { res [ idx ] = idx + 1 ; idx ++ ; } else { k -= fib [ n - idx - 1 ] ; res [ idx ] = idx + 2 ; res [ idx + 1 ] = idx + 1 ; idx += 2 ; } } for ( int i = 0 ; i < n ; i ++ ) out . print ( res [ i ] + " ▁ " ) ; out . println ( ) ; } out . close ( ) ; } static final Random random = new Random ( ) ; static void ruffleSort ( int [ ] a ) { int n = a . length ;


import java . util . Scanner ;   public class problem65 {   public static void main ( String [ ] args ) {

n , m = list ( map ( int , input ( ) . split ( ) ) ) print ( * ( [ n // m ] * ( m - n % m ) + [ n // m + 1 ] * ( n % m ) ) ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) )   if n >= m : m_list = [ 0 ] * m adding = n // m sub_adding = n % m for i in range ( adding ) : for j in range ( len ( m_list ) ) : m_list [ j ] += 1 for k in range ( sub_adding ) : m_list [ k ] += 1 for l in m_list : print ( l , sep = " ▁ " , end = " ▁ " ) NEW_LINE


from sys import stdin , stdout   def main ( ) : n , m = map ( int , stdin . readline ( ) . split ( ' ▁ ' ) ) q , r = n // m , n % m s = [ q for i in range ( m - r ) ] s . extend ( [ ( q + 1 ) for i in range ( m - r , m ) ] ) print ( * s , sep = ' ▁ ' )   if __name__ == " _ _ main _ _ " : main ( ) NEW_LINE


n , m = input ( ) . split ( ) n = int ( n ) m = int ( m ) q = n // mr = n % mlst = [ ] for i in range ( m ) : if ( i < m - r ) : lst . append ( q ) else : lst . append ( q + 1 ) print ( * lst ) NEW_LINE


import java . util . * ;   public class questionCF {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int a [ ] = new int [ m ] ; if ( n % m == 0 ) { for ( int i = 0 ; i < m ; i ++ ) System . out . print ( n / m + " ▁ " ) ; return ; } while ( true ) { for ( int i = m - 1 ; i >= 0 ; i -- ) { a [ i ] += 1 ; -- n ; if ( n == 0 ) { for ( int k = 0 ; k < m ; k ++ ) System . out . print ( a [ k ] + " ▁ " ) ; return ; } } } } }


import java . util . * ; public class P2 {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; while ( n % m != 0 ) { int p = n / m ; System . out . print ( p + " ▁ " ) ; n -= p ; m -- ; } for ( int i = 0 ; i < m ; i ++ ) { System . out . print ( n / m + " ▁ " ) ; } } }


import java . util . * ; public class Sol { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) , m = s . nextInt ( ) , t = m ; for ( int i = 0 ; i < t ; i ++ ) { System . out . print ( n / m + " ▁ " ) ; n -= n / m ; -- m ; } } }


import java . util . Scanner ; public class MammothSGenomeDecoding {   public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int arr [ ] = new int [ 5 ] ;

n = int ( input ( ) )   s = input ( )   a = s . count ( ' A ' ) g = s . count ( ' G ' ) c = s . count ( ' C ' ) t = s . count ( ' T ' )     if n % 4 != 0 or a > n // 4 or g > n // 4 or c > n // 4 or t > n // 4 : print ( " = = = " ) else : a = n // 4 - a g = n // 4 - g c = n // 4 - c t = n // 4 - t     s = list ( s ) for i in range ( n ) : if s [ i ] == ' ? ' : if a : s [ i ] = ' A ' a -= 1 elif g : s [ i ] = ' G ' g -= 1 elif c : s [ i ] = ' C ' c -= 1 else : s [ i ] = ' T ' t -= 1     print ( ' ' . join ( s ) ) NEW_LINE


n = int ( input ( ) ) s = input ( ) f = 0 if ( n % 4 != 0 ) : print ( ' = = = ' ) else : gnm = { } gnm [ ' A ' ] = s . count ( ' A ' ) gnm [ ' C ' ] = s . count ( ' C ' ) gnm [ ' G ' ] = s . count ( ' G ' ) gnm [ ' T ' ] = s . count ( ' T ' ) num = n // 4 for i in gnm : if gnm . get ( i ) > num and i != ' ? ' : f = 1 print ( ' = = = ' ) break else : gnm [ i ] = num - gnm . get ( i ) if f == 0 : s = s . replace ( ' ? ' , ' A ' , gnm [ ' A ' ] ) . replace ( ' ? ' , ' C ' , gnm [ ' C ' ] ) . replace ( ' ? ' , ' G ' , gnm [ ' G ' ] ) . replace ( ' ? ' , ' T ' , gnm [ ' T ' ] ) print ( s ) NEW_LINE


n = int ( input ( ) ) genomes = list ( input ( ) ) if n % 4 != 0 or any ( [ genomes . count ( x ) > n // 4 for x in ' ACGT ' ] ) : print ( ' = = = ' ) else : cnt = { } for x in ' ACGT ' : cnt [ x ] = n // 4 - genomes . count ( x ) for i in range ( n ) : if genomes [ i ] == ' ? ' : for x in ' ACGT ' : if cnt [ x ] > 0 : genomes [ i ] = x cnt [ x ] -= 1 break print ( ' ' . join ( genomes ) ) NEW_LINE


import java . util . * ; import java . math . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;


import java . util . Scanner ;   public class _0700DiverseSubstring {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; sc . nextLine ( ) ; String s = sc . nextLine ( ) ; int val = n / 2 ; char prev = ' # ' ; for ( int i = 0 ; i < n ; i ++ ) { char curr = s . charAt ( i ) ; if ( i == 0 ) { prev = curr ; continue ; } else if ( prev != curr ) { System . out . println ( " YES " ) ; System . out . println ( prev + " " + curr ) ; return ; } prev = curr ; } System . out . println ( " NO " ) ; }   }

n = int ( input ( ) ) s = input ( ) ans = " "   for i in range ( n - 1 ) : if s [ i ] != s [ i + 1 ] : ans = s [ i : i + 2 ] break       if ans : print ( " YES " ) print ( ans )   else : print ( " NO " ) NEW_LINE


x = int ( input ( ) ) s = input ( ) N = 0 for i in range ( x - 1 ) : if s [ i ] != s [ i + 1 ] : print ( " YES " ) print ( s [ i ] + s [ i + 1 ] ) N = 1 breakif N == 0 : print ( " NO " ) NEW_LINE


import sysinput = sys . stdin . readline   n = int ( input ( ) ) s = input ( ) for i in range ( n - 1 ) : if s [ i ] != s [ i + 1 ] : print ( " YES " ) print ( s [ i ] , s [ i + 1 ] , sep = " " ) exit ( ) print ( " NO " ) NEW_LINE


import sysinput = sys . stdin . readline   n = int ( input ( ) ) s = input ( ) for i in range ( n - 1 ) : if s [ i ] != s [ i + 1 ] : print ( " YES " ) print ( s [ i ] , s [ i + 1 ] , sep = " " ) sys . exit ( ) print ( " NO " ) NEW_LINE


n = int ( input ( ) ) s = input ( )   for i in range ( n - 1 ) : if s [ i ] != s [ i + 1 ] : print ( " YES " ) print ( s [ i ] + s [ i + 1 ] ) exit ( 0 ) print ( " NO " ) NEW_LINE


import java . util . Scanner ;   public class DiverseSubS { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , i ; String s = in . next ( ) , o = " NO " ; in . close ( ) ;   for ( i = 0 ; i < n - 1 ; i ++ ) if ( s . charAt ( i ) != s . charAt ( i + 1 ) ) { o = " YES \n " + s . substring ( i , i + 2 ) ; break ; } System . out . println ( o ) ; } }


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; String str = s . next ( ) ; for ( int i = 1 ; i < n ; i ++ ) { if ( str . charAt ( i ) != str . charAt ( i - 1 ) ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( str . charAt ( i - 1 ) ) ; sb . append ( str . charAt ( i ) ) ; System . out . println ( " YES " ) ; System . out . println ( sb ) ; return ; } } System . out . println ( " NO " ) ; } }


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Main { static class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; } } public static void main ( String [ ] args ) throws java . lang . Exception { FastScanner fs = new FastScanner ( ) ;


import java . io . * ; import java . util . * ; public class Solution { public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; while ( t > 0 ) { t -- ; int n = Integer . parseInt ( br . readLine ( ) ) ; StringTokenizer st = new StringTokenizer ( br . readLine ( ) ) ; int [ ] a = new int [ n ] ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = Integer . parseInt ( st . nextToken ( ) ) ; sum += a [ i ] ; } if ( sum % n != 0 ) { out . println ( - 1 ) ; continue ; } out . println ( ( 3 * n - 3 ) ) ; for ( int i = 1 ; i < n ; i ++ ) { int need = a [ i ] % ( i + 1 ) ; if ( need > 0 ) need = ( i + 1 ) - need ; a [ 0 ] -= need ; a [ i ] += need ; out . println ( 1 + " ▁ " + ( i + 1 ) + " ▁ " + need ) ; need = a [ i ] ; a [ 0 ] += need ; out . println ( ( i + 1 ) + " ▁ " + 1 + " ▁ " + ( need / ( i + 1 ) ) ) ; } int fact = a [ 0 ] / n ; for ( int i = 1 ; i < n ; i ++ ) { out . println ( 1 + " ▁ " + ( i + 1 ) + " ▁ " + fact ) ; } } out . close ( ) ; } }

import sys , math   t = int ( input ( ) ) NEW_LINE for i in range ( t ) : n = int ( input ( ) ) NEW_LINE arr = list ( map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) NEW_LINE S = sum ( arr ) NEW_LINE if S % n : NEW_LINE INDENT print ( - 1 ) else : NEW_LINE out = [ ] NEW_LINE DEDENT for i in range ( 1 , n ) : if NEW_LINE arr [ i ] % ( i + 1 ) == 0 : x = arr [ i ] // ( i + 1 ) NEW_LINE arr [ i ] -= ( x * ( i + 1 ) ) NEW_LINE arr [ 0 ] += ( x * ( i + 1 ) ) NEW_LINE out . append ( " { } ▁ { } ▁ { } \n " . format ( i + 1 , 1 , x ) ) NEW_LINE


import osimport NEW_LINE sysfrom NEW_LINE io NEW_LINE import BytesIO , IOBase NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) NEW_LINE a = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE s = sum ( a ) NEW_LINE if s % n != 0 : print ( - 1 ) ; continue NEW_LINE t = s // n NEW_LINE print ( 3 * ( n - 1 ) ) NEW_LINE for i in range ( 1 , n ) : x = ( i + 1 ) - a [ i ] % ( i + 1 ) NEW_LINE if a [ i ] % ( i + 1 ) == 0 : x = 0 NEW_LINE a [ i ] += x NEW_LINE print ( 1 , i + 1 , x ) NEW_LINE print ( i + 1 , 1 , a [ i ] // ( i + 1 ) ) NEW_LINE for i in range ( 1 , n ) : print ( 1 , i + 1 , t ) NEW_LINE


def main ( ) : t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = int ( input ( ) ) NEW_LINE a = [ 0 ] + readIntArr ( ) NEW_LINE


import java . util . Scanner ;   public class practice { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int [ ] distances = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) distances [ i ] = input . nextInt ( ) ; int s = input . nextInt ( ) ; int t = input . nextInt ( ) ; int countForward = 0 , countBackward = 0 ; if ( s < t ) { for ( int i = s ; i < t ; i ++ ) countForward += distances [ i ] ; for ( int i = t ; i != s ; i ++ ) { countBackward += distances [ i ] ; if ( i == n ) i = 0 ; } } if ( s > t ) { for ( int i = t ; i < s ; i ++ ) countBackward += distances [ i ] ; for ( int i = s ; i != t ; i ++ ) { countForward += distances [ i ] ; if ( i == n ) i = 0 ; } } System . out . println ( ( countBackward > countForward ) ? countForward : countBackward ) ; }   }

n = int ( input ( ) ) d = list ( map ( int , input ( ) . split ( ) ) ) s , t = sorted ( map ( int , input ( ) . split ( ) ) ) result1 = 0 result2 = d [ n - 1 ] for i in range ( s - 1 , t - 1 ) : result1 += d [ i ] for i in range ( s - 1 ) : result2 += d [ i ] for i in range ( t - 1 , n - 1 ) : result2 += d [ i ] print ( min ( result1 , result2 ) ) NEW_LINE


n = int ( input ( ) ) d = [ int ( item ) for item in input ( ) . split ( ) ] s , t = [ int ( item ) for item in input ( ) . split ( ) ] ss = min ( s , t ) - 1 tt = max ( s , t ) - 1 dist1 = sum ( d [ ss : tt ] )   print ( min ( sum ( d ) - dist1 , dist1 ) ) NEW_LINE


a = int ( input ( ) ) b = list ( map ( int , input ( ) . split ( ) ) ) c , d = sorted ( map ( int , input ( ) . split ( ) ) ) x = sum ( b [ c - 1 : d - 1 ] ) cnt = 0 print ( min ( x , sum ( b ) - x ) ) NEW_LINE


import sysimport collections   input = sys . stdin . readline   def printnl ( val ) : sys . stdout . write ( str ( val ) + ' \n ' )   n = int ( input ( ) ) d = list ( map ( int , input ( ) . split ( ) ) ) res = sum ( d ) s , t = map ( int , input ( ) . split ( ) ) s -= 1 t -= 1   ans1 , ans2 = 0 , 0   if s == t : print ( 0 ) elif s < t : now = 0 for i in range ( s , t ) : now += d [ i ] if now < res - now : print ( now ) else : print ( res - now ) else : now = 0 for i in range ( t , s ) : now += d [ i ] if now < res - now : print ( now ) else : print ( res - now ) NEW_LINE


import java . util . Scanner ;   public class CircleLine { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , d [ ] = new int [ n ] , i , d1 = 0 , d2 = 0 ;   for ( i = 0 ; i < n ; i ++ ) { d [ i ] = in . nextInt ( ) ; } int s = in . nextInt ( ) - 1 , t = in . nextInt ( ) - 1 , j = s ; while ( j != t ) { d1 += d [ j ] ; j ++ ; if ( j >= n ) { j = 0 ; } } while ( s != t ) { s -- ; if ( s < 0 ) { s = n - 1 ; } d2 += d [ s ] ; } in . close ( ) ; System . out . println ( Math . min ( d1 , d2 ) ) ; } }


import java . io . BufferedOutputStream ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ;   import java . util . ArrayList ; import java . util . Collections ; import java . util . HashMap ; import java . util . StringTokenizer ;     public class Main {   public static PrintWriter out = new PrintWriter ( new BufferedOutputStream ( System . out ) ) ;   static class FastReader {   BufferedReader br ; StringTokenizer st ;   public FastReader ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String [ ] nextSArray ( ) { String sr [ ] = null ; try { sr = br . readLine ( ) . trim ( ) . split ( " ▁ " ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return sr ; }   String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; }   return str ; } }


import java . lang . * ; import java . util . * ; import java . io . * ; public class test { int d [ ] ; Scanner sc = new Scanner ( System . in ) ; PrintWriter pr = new PrintWriter ( System . out , true ) ; public static void main ( String ... args ) { test c = new test ( ) ; c . prop ( ) ; } public void prop ( ) { int n , s , t , min = 0 ; n = sc . nextInt ( ) ; d = new int [ n ] ; for ( int i = 2 ; i <= n + 1 ; ++ i ) { d [ i % n ] = sc . nextInt ( ) ; } s = sc . nextInt ( ) ; t = sc . nextInt ( ) ; int sum = 0 ; if ( t == n ) t = 0 ; if ( s == n ) s = 0 ; if ( s != t ) { for ( int i = s + 1 ; ; ++ i ) { sum += d [ i % n ] ; if ( i % n == t ) break ; } min = sum ; sum = 0 ; for ( int i = s ; ; -- i ) { if ( i < 0 ) sum += d [ ( n + i ) % n ] ; else sum += d [ i % n ] ;   if ( ( n + ( i - 1 ) ) % n == t ) break ; } if ( min > sum ) min = sum ; pr . println ( min ) ; } else pr . println ( 0 ) ; } }


import java . util . Scanner ;   public class practice { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int [ ] distances = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { distances [ i ] = input . nextInt ( ) + distances [ i - 1 ] ; } int s = input . nextInt ( ) ; int t = input . nextInt ( ) ; if ( s > t ) { int temp = s ; s = t ; t = temp ; } int dis = Math . min ( distances [ t - 1 ] - distances [ s - 1 ] , distances [ n ] - distances [ t - 1 ] + distances [ s - 1 ] ) ; System . out . println ( dis ) ; }   }


import java . io . * ; import java . math . * ; import java . util . * ;     public class Main {   private static int dx [ ] = { 1 , 0 , - 1 , 0 } ; private static int dy [ ] = { 0 , - 1 , 0 , 1 } ;   private static final long INF = ( long ) Math . pow ( 10 , 16 ) ; private static final int INT_INF = Integer . MAX_VALUE ; private static final long NEG_INF = Long . MIN_VALUE ; private static final int NEG_INT_INF = Integer . MIN_VALUE ; private static final double EPSILON = 1e-10 ;   private static final long MAX = ( long ) 1e12 ; private static final long MOD = 1000000007 ;   private static final int MAXN = 300005 ; private static final int MAXA = 1000007 ; private static final int MAXLOG = 22 ; private static final double PI = Math . acos ( - 1 ) ; public static void main ( String [ ] args ) throws IOException {   InputReader in = new InputReader ( System . in ) ;


n , k = map ( int , input ( ) . split ( ) ) s = input ( ) . split ( ) ans = [ ] for i in range ( 26 ) : ans . append ( chr ( 65 + i ) + " a " ) for i in range ( 24 ) : ans . append ( chr ( 65 + i ) + " b " ) for i in range ( n - k + 1 ) : if s [ i ] == " NO " : ans [ i + k - 1 ] = ans [ i ] ans = ans [ : n ] print ( * ans ) NEW_LINE


import sys import mathfrom collections import Counterfrom operator import itemgetterimport queue   def IO ( ) : sys . stdin = open ( " pyinput . txt " , ' r ' ) sys . stdout = open ( " pyoutput . txt " , ' w ' )   def GCD ( a , b ) : if ( b == 0 ) : return a else : return GCD ( b , a % b )   def LCM ( a , b ) : return a * ( b // GCD ( a , b ) )   def scan ( TYPE_1 , TYPE_2 = 0 ) : if ( TYPE_1 == int ) : return map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) elif ( TYPE_1 == float ) : return map ( float , sys . stdin . readline ( ) . strip ( ) . split ( ) ) elif ( TYPE_1 == list and TYPE_2 == float ) : return list ( map ( float , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) elif ( TYPE_1 == list and TYPE_2 == int ) : return list ( map ( int , sys . stdin . readline ( ) . strip ( ) . split ( ) ) ) elif ( TYPE_1 == str ) : return sys . stdin . readline ( ) . strip ( ) else : print ( " ERROR ! ! ! ! " )         def main ( ) : s = [ ] for i in range ( 65 , 91 ) : s . append ( chr ( i ) ) for i in range ( 97 , 123 ) : s . append ( ' A ' + chr ( i ) )   n , k = scan ( int ) a = scan ( str ) . split ( ) ans = [ ] idx = 0   for i in range ( k - 1 ) : ans . append ( s [ idx ] ) idx += 1   for i in range ( n - k + 1 ) : if ( a [ i ] == ' NO ' ) : ans . append ( ans [ - k + 1 ] ) else : ans . append ( s [ idx ] ) idx += 1   print ( * ans )       NEW_LINE


''' input8 ▁ 3NO ▁ NO ▁ YES ▁ YES ▁ YES ▁ NO ''' n , k = map ( int , input ( ) . split ( ) ) s = input ( ) . split ( ) names = [ chr ( ord ( ' A ' ) + ( i // 26 ) ) + chr ( ord ( ' a ' ) + ( i % 26 ) ) for i in range ( 1 , n + 1 ) ] for i in range ( len ( s ) ) : if ( s [ i ] == ' NO ' ) : names [ i + k - 1 ] = names [ i ] for name in names : print ( name , end = ' ▁ ' ) NEW_LINE


import java . io . * ; import java . util . * ; import java . util . stream . Collectors ; import java . util . stream . Stream ;   import static java . lang . Integer . * ; import static java . lang . Math . * ;   public class CF771B { public static void main ( String args [ ] ) throws Throwable { BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; for ( String ln ; ( ln = in . readLine ( ) ) != null && ! ln . equals ( " " ) ; ) { StringTokenizer st = new StringTokenizer ( ln ) ; int N = parseInt ( st . nextToken ( ) ) , K = parseInt ( st . nextToken ( ) ) ; String [ ] result = new String [ N ] ; st = new StringTokenizer ( in . readLine ( ) ) ; for ( int i = 0 ; i < N - K + 1 ; i ++ ) { if ( st . nextToken ( ) . equals ( " YES " ) ) { for ( int j = i ; j < i + K ; j ++ ) if ( result [ j ] == null ) result [ j ] = getName ( j ) ; } else { if ( result [ i ] == null ) { result [ i ] = getName ( i ) ; result [ i + K - 1 ] = getName ( i ) ; } else result [ i + K - 1 ] = result [ i ] ; } } for ( int i = 0 ; i < N ; i ++ ) if ( result [ i ] == null ) result [ i ] = getName ( i ) ; System . out . println ( Stream . of ( result ) . collect ( Collectors . joining ( " ▁ " ) ) ) ; } }   static String getName ( int p ) { if ( p < 26 ) return ( char ) ( p + ' A ' ) + " " ; return ( char ) ( p / 26 + ' A ' ) + " " + ( char ) ( p % 26 + ' a ' ) ; } }


import java . util . Arrays ; import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) , k = sc . nextInt ( ) ; boolean [ ] rp = new boolean [ n ] ; String [ ] arr = new String [ n ] ; for ( int i = 0 ; i < n - k + 1 ; ++ i ) { rp [ i ] = sc . next ( ) . equals ( " NO " ) ; } for ( int i = 0 ; i < n ; ++ i ) { if ( arr [ i ] == null ) arr [ i ] = ( i < 25 ? " A " : " B " ) + ( char ) ( ' a ' + i % 25 ) ; if ( rp [ i ] ) { arr [ i + k - 1 ] = arr [ i ] ; } } for ( String s : arr ) System . out . print ( s + " ▁ " ) ; } }