import java . util . * ;   public class Test { public static void main ( String [ ] args ) {   Scanner input = new Scanner ( System . in ) ; int w = 0 , b = 0 ; for ( int a = 0 ; a < 8 ; a ++ ) { char [ ] s = input . next ( ) . toCharArray ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { switch ( s [ i ] ) { case ' P ' : w ++ ; break ; case ' B ' : w += 3 ; break ; case ' N ' : w += 3 ; break ; case ' R ' : w += 5 ; break ; case ' Q ' : w += 9 ; break ; case ' p ' : b ++ ; break ; case ' b ' : b += 3 ; break ; case ' n ' : b += 3 ; break ; case ' r ' : b += 5 ; break ; case ' q ' : b += 9 ; } } } if ( w > b ) { System . out . println ( " White " ) ; } else if ( w < b ) { System . out . println ( " Black " ) ; } else System . out . println ( " Draw " ) ; } }

import java . util . * ; import java . io . * ;   public class Main { 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 ; } } public static void main ( String args [ ] ) { FastReader sc = new FastReader ( ) ; int t = 8 ; int b = 0 , w = 0 ; while ( t -- > 0 ) { String s = sc . next ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { char ss = s . charAt ( i ) ; if ( ss == ' Q ' ) { w += 9 ; } else if ( ss == ' R ' ) w += 5 ; else if ( ss == ' B ' ) w += 3 ; else if ( ss == ' N ' ) w += 3 ; else if ( ss == ' P ' ) w += 1 ; else if ( ss == ' q ' ) { b += 9 ; } else if ( ss == ' r ' ) b += 5 ; else if ( ss == ' b ' ) b += 3 ; else if ( ss == ' n ' ) b += 3 ; else if ( ss == ' p ' ) b += 1 ; } } if ( w > b ) System . out . println ( " White " ) ; else if ( b > w ) System . out . println ( " Black " ) ; else System . out . println ( " Draw " ) ; } }

import java . util . * ;   public class CF102 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; Map < Character , Integer > map = new HashMap < > ( ) ; map . put ( ' Q ' , 9 ) ; map . put ( ' R ' , 5 ) ; map . put ( ' B ' , 3 ) ; map . put ( ' N ' , 3 ) ; map . put ( ' P ' , 1 ) ; map . put ( ' K ' , 0 ) ;   map . put ( ' q ' , 9 ) ; map . put ( ' r ' , 5 ) ; map . put ( ' b ' , 3 ) ; map . put ( ' n ' , 3 ) ; map . put ( ' p ' , 1 ) ; map . put ( ' k ' , 0 ) ; long p1 = 0 ; long p2 = 0 ;

boardWeight = 0 pieceWeights = { " Q " : 9 , " R " : 5 , " B " : 3 , " N " : 3 , " P " : 1 , " K " : 0 , " q " : - 9 , " r " : - 5 , " b " : - 3 , " n " : - 3 , " p " : - 1 , " k " : 0 , " . " : 0 } for row in range ( 8 ) : letters = input ( ) for i in range ( 8 ) : piece = letters [ i ] boardWeight += pieceWeights [ piece ] if boardWeight > 0 : print ( " White " ) elif boardWeight < 0 : print ( " Black " ) else : print ( " Draw " ) NEW_LINE

cap = { ' Q ' : 9 , ' R ' : 5 , ' B ' : 3 , ' N ' : 3 , ' P ' : 1 , ' q ' : 9 , ' r ' : 5 , ' b ' : 3 , ' n ' : 3 , ' p ' : 1 } low = " qrbnp " upp = " QRBNP " upp_c = 0 low_c = 0 i = 8 while i : for j in input ( ) : if j in upp : upp_c += cap [ j ] elif j in low : low_c += cap [ j ] i -= 1 if upp_c > low_c : print ( " White " ) elif upp_c < low_c : print ( " Black " ) else : print ( " Draw " )   NEW_LINE

a = [ ] for i in range ( 8 ) : b = input ( ) a . append ( b ) white = 0 black = 0 for i in range ( 8 ) : for x in range ( 8 ) : if a [ i ] [ x ] == " r " : black = black + 5 elif a [ i ] [ x ] == " b " : black = black + 3 elif a [ i ] [ x ] == " n " : black = black + 3 elif a [ i ] [ x ] == " p " : black = black + 1 elif a [ i ] [ x ] == " q " : black = black + 9 elif a [ i ] [ x ] == " R " : white = white + 5 elif a [ i ] [ x ] == " B " : white = white + 3 elif a [ i ] [ x ] == " N " : white = white + 3 elif a [ i ] [ x ] == " P " : white = white + 1 elif a [ i ] [ x ] == " Q " : white = white + 9 if white > black : print ( " White " ) elif black > white : print ( " Black " ) else : print ( " Draw " ) NEW_LINE

white = 0 black = 0 for x in range ( 8 ) : i = input ( ) white += i . count ( " Q " ) * 9 white += i . count ( " R " ) * 5 white += i . count ( " B " ) * 3 white += i . count ( " N " ) * 3 white += i . count ( " P " ) * 1 black += i . count ( " q " ) * 9 black += i . count ( " r " ) * 5 black += i . count ( " b " ) * 3 black += i . count ( " n " ) * 3 black += i . count ( " p " ) * 1 if white > black : print ( " White " ) elif black > white : print ( " Black " ) else : print ( " Draw " ) NEW_LINE


import java . io . IOException ; import java . util . Scanner ;   public class A { public static void main ( String [ ] args ) throws IOException { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ; int m = scan . nextInt ( ) ; int min = scan . nextInt ( ) ; int max = scan . nextInt ( ) ;

import java . util . * ; import java . io . * ; import java . lang . * ;    public class A413 {   public static void main ( String [ ] args ) { int n , m , min , max ; int start , end , mMin , mMax ; Scanner s = new Scanner ( System . in ) ; n = s . nextInt ( ) ; m = s . nextInt ( ) ; min = s . nextInt ( ) ; max = s . nextInt ( ) ;   int extra = n - m ; start = s . nextInt ( ) ; mMin = start ; mMax = start ; end = start ; if ( end > max || end < min ) { System . out . println ( " Incorrect " ) ; return ; }   for ( int i = 1 ; i < m ; i ++ ) { end = s . nextInt ( ) ; if ( end > max || end < min ) { System . out . println ( " Incorrect " ) ; return ; } mMax = Math . max ( end , mMax ) ; mMin = Math . min ( end , mMin ) ; } if ( extra >= 2 ) System . out . println ( " Correct " ) ; else if ( mMax == max && extra == 1 ) System . out . println ( " Correct " ) ; else if ( mMin == min && extra == 1 ) System . out . println ( " Correct " ) ; else if ( mMin == min && mMax == max ) System . out . println ( " Correct " ) ; else System . out . println ( " Incorrect " ) ; } }

import java . util . Scanner ;   public class dataRecovery { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ;   int minM = sc . nextInt ( ) ; int maxM = sc . nextInt ( ) ;   int newMin = 200 ; int newMax = 0 ; int [ ] arr = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; if ( arr [ i ] < newMin ) newMin = arr [ i ] ; if ( arr [ i ] > newMax ) newMax = arr [ i ] ; }   if ( newMax > maxM || newMin < minM ) { System . out . println ( " Incorrect " ) ; } else { if ( newMax != maxM && newMin != minM ) { if ( n - m < 2 ) { System . out . println ( " Incorrect " ) ; } else { System . out . println ( " Correct " ) ; } } else { System . out . println ( " Correct " ) ; } } } }

import sys   def minp ( ) : return sys . stdin . readline ( ) . strip ( )   def mint ( ) : return int ( minp ( ) )   def mints ( ) : return map ( int , minp ( ) . split ( ) )   n , m , mi , ma = mints ( ) a = list ( mints ( ) ) mii = min ( a ) maa = max ( a ) if mii > mi : m += 1 if maa < ma : m += 1 if mii < mi or maa > ma or m > n : print ( " Incorrect " ) else : print ( " Correct " ) NEW_LINE

n , m , min_a , max_a = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) if m <= n - 2 : if min ( a ) >= min_a and max ( a ) <= max_a : print ( " Correct " ) else : print ( " Incorrect " ) elif m == n - 1 : if min ( a ) == min_a and max ( a ) <= max_a or max ( a ) == max_a and min ( a ) >= min_a : print ( " Correct " ) else : print ( " Incorrect " ) elif n == m : if min ( a ) == min_a and max ( a ) == max_a : print ( " Correct " ) else : print ( " Incorrect " ) else : print ( " Incorrect " ) NEW_LINE

n , m , l , r = map ( int , input ( ) . split ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) if max ( a ) > r or min ( a ) < l : print ( " Incorrect " ) elif n - m >= 2 : print ( " Correct " ) else : if l not in a and r not in a and l != r : print ( " Incorrect " ) else : print ( " Correct " ) NEW_LINE

n , m , minimum , maximum = map ( int , input ( ) . split ( ) ) seq = [ int ( i ) for i in input ( ) . split ( ) ] if max ( seq ) > maximum or min ( seq ) < minimum : print ( ' Incorrect ' ) else : if maximum not in seq and minimum not in seq : if n - m >= 2 : print ( ' Correct ' ) else : print ( ' Incorrect ' ) elif maximum in seq and minimum in seq : print ( ' Correct ' ) else : if n - m >= 1 : print ( ' Correct ' ) else : print ( ' Incorrect ' ) NEW_LINE


import java . util . * ; import java . util . jar . JarOutputStream ;   public class Practise {   public static int [ ] [ ] dp ; public static void main ( String [ ] args ) {

import java . util . Scanner ;   public class _0724FairGame {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int firstNum = - 1 ; int firstCount = 0 ; int secondNum = - 1 ; int secondCount = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int temp = sc . nextInt ( ) ; if ( i == 0 ) { firstNum = temp ; firstCount ++ ; } else if ( temp == firstNum ) { firstCount ++ ; } else { if ( secondNum == - 1 ) { secondNum = temp ; secondCount ++ ; } else if ( temp == secondNum ) { secondCount ++ ; } else { System . out . println ( " NO " ) ; return ; } } } if ( firstCount == secondCount ) { System . out . println ( " YES " ) ; System . out . println ( firstNum + " ▁ " + secondNum ) ; } else { System . out . println ( " NO " ) ; } }   }

n = int ( input ( ) ) s = set ( ) arr = [ ] for _ in range ( n ) : arr . append ( int ( input ( ) ) ) s . add ( arr [ - 1 ] )   if len ( s ) != 2 : print ( " NO " ) else : x , y = s if ( arr . count ( x ) == arr . count ( y ) ) : print ( " YES " ) print ( y , x ) else : print ( " NO " ) NEW_LINE

n = int ( input ( ) ) llst = [ ] llst1 = [ ] summ = 0 for i in range ( n ) : llst . append ( int ( input ( ) ) ) for i in llst : if i not in llst1 and llst . count ( i ) == n // 2 : summ += llst . count ( i ) llst1 . append ( i ) if summ == n : print ( ' YES ' ) print ( * llst1 ) else : print ( ' NO ' ) NEW_LINE

list_n_len = [ 0 for i in range ( 120 ) ] list_n = [ ] for i in range ( int ( input ( ) ) ) : a = int ( input ( ) ) list_n_len [ a ] += 1 list_n . append ( a ) list_n = list ( set ( list_n ) ) if len ( list_n ) == 2 and list_n_len [ list_n [ 0 ] ] == list_n_len [ list_n [ 1 ] ] : print ( " YES " ) print ( list_n [ 0 ] , list_n [ 1 ] ) else : print ( " NO " ) NEW_LINE

n = int ( input ( ) ) freq = { } for _ in range ( n ) : num = int ( input ( ) ) freq [ num ] = freq . get ( num , 0 ) + 1 keys = list ( freq . keys ( ) ) if len ( keys ) == 2 and freq [ keys [ 0 ] ] == n // 2 : print ( ' YES ' ) print ( * keys ) else : print ( ' NO ' ) NEW_LINE


import java . io . * ; import java . util . * ; import java . text . * ; import java . math . * ; import java . util . regex . * ; public class Main { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int z = s . nextInt ( ) ; while ( z -- > 0 ) { int a = s . nextInt ( ) , b = s . nextInt ( ) , n = s . nextInt ( ) , ans = 0 ; if ( n % 3 == 1 ) ans = b ; else if ( n % 3 == 2 ) ans = a ^ b ; else ans = a ; System . out . println ( ans ) ; } } }

import java . util . * ; import java . util . Arrays ; public class Main { static int nthXorFib ( int n , int a , int b ) { if ( n == 0 ) return a ; if ( n == 1 ) return b ; if ( n == 2 ) return ( a ^ b ) ; return nthXorFib ( n % 3 , a , b ) ; } public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; System . out . println ( nthXorFib ( n , a , b ) ) ; } } }

import java . util . * ; public class Solution { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int t = s . nextInt ( ) ; for ( int k = 0 ; k < t ; k ++ ) { int a = s . nextInt ( ) ; int b = s . nextInt ( ) ; int n = s . nextInt ( ) ; int v = check ( a , b , n ) ; System . out . println ( v ) ; } } public static int check ( int a , int b , int n ) { if ( n == 0 ) return a ; if ( n == 1 ) return b ; if ( n == 2 ) return a ^ b ; return check ( a , b , n % 3 ) ; } }

import java . io . * ; import java . util . * ; import javax . print . attribute . standard . Finishings ;   import java . math . * ;   public class XorNiacci { static final Random random = new Random ( ) ; static PrintWriter out = new PrintWriter ( ( System . out ) ) ; static Reader sc = new Reader ( ) ;   public static void main ( String args [ ] ) throws IOException { int t = sc . nextInt ( ) ; while ( t -- > 0 ) {

import java . util . * ;   public class Practise {   static int [ ] [ ] dp ;    public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t > 0 ) { long a = sc . nextInt ( ) ; long b = sc . nextInt ( ) ; long n = sc . nextInt ( ) ; if ( n % 3 == 0 ) System . out . println ( a ) ; else if ( n % 3 == 1 ) System . out . println ( b ) ; else { System . out . println ( a ^ b ) ; }   t -- ; }

t = int ( input ( ) )   while t > 0 : a , b , n = map ( int , input ( ) . split ( ) ) xorval = a ^ b if n % 3 == 0 : print ( a ) elif n % 3 == 1 : print ( b ) else : print ( xorval ) t -= 1 NEW_LINE

for i in range ( int ( input ( ) ) ) : a , b , n = map ( int , input ( ) . split ( ' ▁ ' ) ) g = [ a , b , a ^ b ] print ( g [ n % 3 ] ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : a , b , c = map ( int , input ( ) . split ( ) ) c %= 3 print ( [ a , b , a ^ b ] [ c ] ) NEW_LINE

cases = int ( input ( ) ) while cases : cases -= 1 a , b , n = map ( int , input ( ) . split ( ) )   ans = [ a , b , a ^ b ]   print ( ans [ n % 3 ] ) 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 . * ; public class CodeForces { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int t = scan . nextInt ( ) ; while ( t -- > 0 ) { int n = scan . nextInt ( ) ; int x = scan . nextInt ( ) ; System . out . println ( x * 2 ) ; } scan . close ( ) ; } }

import java . util . * ; import java . io . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;

import java . util . Scanner ;   public class RemoveaProgression { public static void main ( String args [ ] ) { Scanner scan = new Scanner ( System . in ) ; int t = scan . nextInt ( ) ; while ( t -- > 0 ) { int n = scan . nextInt ( ) ; int k = scan . nextInt ( ) ; System . out . println ( k * 2 ) ; } } }

n = int ( input ( ) ) while n > 0 : n = n - 1 a , b = map ( int , input ( ) . split ( ) ) print ( b * 2 )     NEW_LINE

a = int ( input ( ) ) for i in range ( a ) : n , x = map ( int , input ( ) . split ( ) ) print ( 2 * x ) NEW_LINE

for _ in [ 0 ] * int ( input ( ) ) : print ( 2 * int ( input ( ) . split ( ) [ 1 ] ) ) NEW_LINE

t = int ( input ( ) ) for z in range ( t ) : n , x = input ( ) . split ( ) n = int ( n ) x = int ( x ) print ( 2 * x ) NEW_LINE

''' Description : ▁ https : / / blog . csdn . net / qq _ 45859188Author : ▁ NEFU ▁ AB _ INversion : ▁ 1.0Date : ▁ 2021-03-14 ▁ 09:56:33LastEditors : ▁ NEFU ▁ AB _ INLastEditTime : ▁ 2021-03-20 ▁ 18:45:06 ''' import math   def solve ( ) : n , x = map ( int , input ( ) . split ( ) ) print ( 2 * x ) for _ in range ( int ( input ( ) ) ) : solve ( ) NEW_LINE


import java . util . Collections ; import java . util . * ; import java . lang . * ; import java . math . BigInteger ; import java . io . * ; import java . io . * ; import java . util . * ;   import java . util . Arrays ; public class CodeChef {   public static void main ( String args [ ] ) throws IOException {   BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringBuilder sb = new StringBuilder ( ) ; String [ ] sr = br . readLine ( ) . split ( " " ) ; String [ ] pr = br . readLine ( ) . split ( " " ) ; Integer [ ] arr = new Integer [ sr . length ] ; Integer [ ] arr1 = new Integer [ pr . length ] ; for ( int i = 0 ; i < sr . length ; i ++ ) arr [ i ] = Integer . parseInt ( sr [ i ] ) ; for ( int i = 0 ; i < pr . length ; i ++ ) arr1 [ i ] = Integer . parseInt ( pr [ i ] ) ;   Arrays . sort ( arr1 , Collections . reverseOrder ( ) ) ;   int l = 0 , m = 0 ; for ( ; l < sr . length ; l ++ ) { for ( ; m < pr . length ; m ++ ) { if ( arr1 [ m ] > arr [ l ] ) { arr [ l ] = arr1 [ m ] ; m ++ ; break ; } else { break ; } } } for ( int i = 0 ; i < sr . length ; i ++ ) System . out . print ( arr [ i ] ) ; }   }

import java . util . Scanner ;   public class B169 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; char [ ] A = in . next ( ) . toCharArray ( ) ; int [ ] stat = new int [ 10 ] ; for ( char c : in . next ( ) . toCharArray ( ) ) { stat [ c - '0' ] ++ ; } stat [ 0 ] ++ ; char replacement = '9' ; int idx = 0 ; while ( idx < A . length ) { while ( stat [ replacement - '0' ] == 0 ) replacement -- ; if ( A [ idx ] < replacement ) { A [ idx ] = replacement ; stat [ replacement - '0' ] -- ; } idx ++ ; } System . out . println ( new String ( A ) ) ; }   }

import java . util . Arrays ; import java . util . Scanner ;   public class Main {    public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;

import java . util . Scanner ; import java . util . Arrays ; public class Ishu { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int n , m , i , j ; String a , s ; char [ ] ch = new char [ 100000 ] ; a = scan . next ( ) ; s = scan . next ( ) ; n = a . length ( ) ; m = s . length ( ) ; ch = s . toCharArray ( ) ; Arrays . sort ( ch , 0 , m ) ; s = String . valueOf ( ch ) ; char [ ] A = a . toCharArray ( ) ; j = m - 1 ; for ( i = 0 ; i < n && j >= 0 ; ++ i ) if ( A [ i ] < s . charAt ( j ) ) { A [ i ] = s . charAt ( j ) ; j -- ; } a = String . valueOf ( A ) ; System . out . println ( a ) ; } }

a = input ( ) s = input ( ) s = " " . join ( sorted ( s , reverse = True ) ) j = 0   for i in range ( len ( a ) ) : if ( a [ i ] < s [ j ] ) : a = a [ 0 : i ] + s [ j ] + a [ i + 1 : ] j = j + 1   if ( j == len ( s ) ) : breakprint ( a ) NEW_LINE

a = [ int ( x ) for x in input ( ) ] b = sorted ( [ int ( y ) for y in input ( ) ] , reverse = True ) y = 0   for i in range ( 0 , len ( a ) ) : if y < len ( b ) and a [ i ] < b [ y ] : a [ i ] = b [ y ] y = y + 1       print ( " " . join ( [ str ( c ) for c in a ] ) ) NEW_LINE

a = [ i for i in input ( ) ] b = sorted ( [ i for i in input ( ) ] , reverse = True ) i , p = 0 , 0 while i < len ( a ) and p < len ( b ) : if a [ i ] < b [ p ] : a [ i ] = b [ p ] p += 1 i += 1 print ( ' ' . join ( a ) ) NEW_LINE

n = str ( input ( ) ) s = str ( input ( ) ) ref = 10 * [ 0 ] for j in range ( len ( s ) ) : index = ord ( s [ j ] ) - 48 ref [ index ] += 1 for j in range ( len ( n ) ) : output = n [ j ] num = ord ( n [ j ] ) - 48 for k in range ( 9 , num , - 1 ) : if ref [ k ] > 0 : output = str ( k ) ref [ k ] -= 1 break print ( end = output ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t , s , x ; boolean f = false ; t = sc . nextInt ( ) ; s = sc . nextInt ( ) ; x = sc . nextInt ( ) ; while ( t <= x ) { if ( t == x || t + s == x || t + s + 1 == x ) { System . out . println ( " YES " ) ; f = true ; break ; } t += s ; } if ( ! f ) System . out . println ( " NO " ) ; } }

import java . util . Scanner ;   public class PineappleBark { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; long t = in . nextLong ( ) , s = in . nextLong ( ) , x = in . nextLong ( ) ;   in . close ( ) ; x -= t ; System . out . println ( ( ( x % s == 0 || x % s == 1 ) && x > 1 ) || x == 0 ? " YES " : " NO " ) ; } }

a , b , c = map ( int , input ( ) . split ( ) )   if c < a : print ( " NO " ) else : NEW_LINE

from typing import Listimport heapqimport functoolsfrom collections import dequefrom functools import lru_cacheimport collectionsimport randomimport itertoolsfrom itertools import product as productfrom itertools import accumulate as accumulatefrom collections import defaultdictfrom collections import Counterfrom functools import cmp_to_key   import bisectimport mathimport sys   ''' xcopy ▁ / y ▁ D : \water\learning\python\codeForce . py ▁ line ▁ = ▁ sys . stdin . readline ( ) . strip ( ) n ▁ = ▁ int ( n ) s = ▁ input ( ) . strip ( ) t , ▁ v ▁ = ▁ tuple ( map ( int , ▁ input ( ) . strip ( ) . split ( ) ) ) ''' if __name__ == " _ _ main _ _ " :   t , s , x = tuple ( map ( int , input ( ) . strip ( ) . split ( ) ) ) Y = " YES " N = ' NO ' if x < t : print ( N ) exit ( ) m = t % s n = ( t + 1 ) % s l = x % s if m == l or ( n == l and x != t + 1 ) : print ( Y ) else : print ( N )   NEW_LINE

t , s , x = map ( int , input ( ) . split ( ) ) if x >= t : x -= t sss = x // s x = x % s if x == 0 or ( sss != 0 and x == 1 ) : print ( ' YES ' ) else : print ( ' NO ' ) else : print ( ' NO ' ) NEW_LINE

import mathdef solve ( t , s , x ) : if x < t : return ' NO ' if x == t : return ' YES ' if x < t + s : return ' NO ' if ( x - t ) % s == 0 or ( x - t - 1 ) % s == 0 : return ' YES ' return ' NO '                     def main ( ) : NEW_LINE


import java . util . * ;   public final class string { public static void main ( String [ ] Args ) { Scanner s = new Scanner ( System . in ) ; String S = s . nextLine ( ) ; String x = " " ; for ( int i = 0 ; i < S . length ( ) ; i ++ ) { x = " " ; x = x + S . charAt ( i ) ; switch ( x ) { case " a " : case " e " : case " i " : case " o " : case " A " : case " E " : case " I " : case " O " : case " U " : case " Y " : case " y " : case " u " : S = S . replace ( x , " " ) ; i -- ; break ; default : S = S . substring ( 0 , i ) + " . " + S . substring ( i ) ; i ++ ; break ;    } } S = S . toLowerCase ( ) ; System . out . println ( S ) ; } }

import java . util . * ;   public class Main { public static void main ( String [ ] args ) { Scanner stdin = new Scanner ( System . in ) ; ArrayList < Character > v = new ArrayList < Character > ( ) ; v . add ( ' a ' ) ; v . add ( ' e ' ) ; v . add ( ' i ' ) ; v . add ( ' o ' ) ; v . add ( ' u ' ) ; v . add ( ' y ' ) ; String s = stdin . next ( ) ; String ans = " " ; s = s . toLowerCase ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( ! v . contains ( s . charAt ( i ) ) ) { ans += " . " + s . charAt ( i ) ; } } System . out . println ( ans ) ; } }

import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; String input = scanner . next ( ) ; StringBuilder bld = new StringBuilder ( ) ; input = input . toLowerCase ( ) ; input = input . replaceAll ( " [ aeiouy ] " , " " ) ; if ( input . length ( ) > 0 ) { for ( int i = 0 ; i < input . length ( ) ; i ++ ) { bld . append ( " . " ) . append ( input . charAt ( i ) ) ; } } System . out . println ( bld ) ; } }

import java . util . * ;   public class Main {   public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; String str = scanner . nextLine ( ) . toLowerCase ( ) ; char [ ] charArr = str . toCharArray ( ) ; List < Character > tempArr = new ArrayList < > ( ) ;   for ( int i = 0 ; i < charArr . length ; i ++ ) { char current = charArr [ i ] ; if ( current != ' a ' && current != ' e ' && current != ' i ' && current != ' o ' && current != ' u ' && current != ' y ' ) { tempArr . add ( ' . ' ) ; tempArr . add ( current ) ; } }   for ( int i = 0 ; i < tempArr . size ( ) ; i ++ ) { System . out . print ( tempArr . get ( i ) ) ; } }   }

def task ( input ) : result = list ( ) vowels = [ " a " , " o " , " y " , " e " , " u " , " i " , " A " , " O " , " Y " , " E " , " U " , " I " ] for n in list ( input ) : if ( n not in vowels ) : result . append ( " . " ) result . append ( n . lower ( ) ) return ' ' . join ( result )     if __name__ == ' _ _ main _ _ ' : print ( task ( input ( ) ) ) NEW_LINE

a = input ( ) a = a . lower ( ) k = " aoyeui " r = " " for i in range ( len ( a ) ) : if a [ i ] not in k : r += " . " + a [ i ] print ( r ) NEW_LINE

n = input ( ) . lower ( ) m = ' ' for i in range ( len ( n ) ) : if n [ i ] not in " aoyeui " : m += n [ i ] print ( ' . ' + " . " . join ( m ) ) NEW_LINE

if __name__ == ' _ _ main _ _ ' : s = input ( ) temp = [ ] for i in s : if i in [ ' A ' , ' E ' , ' I ' , ' O ' , ' U ' , ' a ' , ' e ' , ' i ' , ' o ' , ' u ' , ' Y ' , ' y ' ] : continue else : temp . append ( ' . ' ) temp . append ( i . lower ( ) ) print ( " " . join ( temp ) ) NEW_LINE

s = list ( input ( ) ) v = [ " A " , " O " , " Y " , " E " , " U " , " I " , " a " , " o " , " y " , " e " , " u " , " i " ] for i in range ( len ( s ) ) : if s [ i ] not in v : if ord ( s [ i ] ) < 97 : print ( ' . ' , end = " " ) print ( chr ( ord ( s [ i ] ) + 32 ) , end = " " ) else : print ( ' . ' , end = " " ) print ( s [ i ] , end = " " ) NEW_LINE


import java . io . * ;    public class A187 { public static void main ( String [ ] args ) throws IOException { BufferedReader inp = new BufferedReader ( new InputStreamReader ( System . in ) ) ; BufferedWriter out = new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ; int size = Integer . parseInt ( inp . readLine ( ) ) ; int [ ] given = new int [ size ] ; String [ ] s1 = inp . readLine ( ) . split ( " ▁ " ) ; String [ ] s2 = inp . readLine ( ) . split ( " ▁ " ) ; int [ ] given1 = new int [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { given1 [ i ] = Integer . parseInt ( s1 [ i ] ) ; given [ i ] = Integer . parseInt ( s2 [ i ] ) ; } int i = 0 ; int j = 0 ; int count = 0 ; while ( i < size && j < size ) { if ( given1 [ i ] == given [ j ] ) { count ++ ; i ++ ; j ++ ; } else { j ++ ; } } System . out . println ( size - count ) ;   } }

import java . util . Scanner ;     public class p187a { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; int [ ] p1 = new int [ n ] ; int [ ] p2 = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) p1 [ i ] = in . nextInt ( ) - 1 ; for ( int i = 0 ; i < n ; i ++ ) p2 [ in . nextInt ( ) - 1 ] = i ; int prev = - 1 ; int i ; for ( i = 0 ; i < n && p2 [ p1 [ i ] ] > prev ; i ++ ) { prev = p2 [ p1 [ i ] ] ; } System . out . println ( n - i ) ; } }

import java . io . * ; import java . util . * ; public class Main implements Runnable { private void solve ( ) throws IOException { int n = nextInt ( ) ; int a [ ] = new int [ n + 1 ] ; int b [ ] = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) a [ i ] = nextInt ( ) ; int pos [ ] = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) pos [ nextInt ( ) ] = i ; for ( int i = 1 ; i <= n ; i ++ ) a [ i ] = pos [ a [ i ] ] ; int firstwrong = 1 ; while ( firstwrong <= n && a [ firstwrong ] == firstwrong ) firstwrong ++ ; int moves = 0 , k = 0 ; while ( firstwrong <= n ) { k ++ ; n -- ; moves ++ ; while ( firstwrong <= n && a [ firstwrong ] == firstwrong + k ) firstwrong ++ ; } out . println ( moves ) ; }

n = int ( input ( ) ) a1 = list ( map ( int , input ( ) . split ( ) ) ) a2 = list ( map ( int , input ( ) . split ( ) ) ) vis , j = set ( ) , n - 1 res = jfor i in range ( n - 1 , - 1 , - 1 ) : if a2 [ i ] in vis : continue if a2 [ i ] == a1 [ j ] : j -= 1 continue while a2 [ i ] != a1 [ j ] : vis . add ( a1 [ j ] ) j -= 1 j -= 1 res = j + 1 print ( n - res - 1 ) NEW_LINE

import sysinput = sys . stdin . readlinefrom math import * import bisect as bsn = int ( input ( ) ) a = [ int ( x ) for x in input ( ) . split ( ) ] b = [ int ( x ) for x in input ( ) . split ( ) ] d = { } for i in range ( n ) : d [ b [ i ] ] = i   c = 0 ans = 0 u = [ 0 for i in range ( n ) ] for i in range ( n ) : u [ i ] = d [ a [ i ] ] NEW_LINE


import java . util . Scanner ;   public class _0691RoomsandStaircases {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int cases = sc . nextInt ( ) ; while ( cases > 0 ) { int n = sc . nextInt ( ) ; sc . nextLine ( ) ; String s = sc . nextLine ( ) ; int pos = - 1 ; if ( ( n - s . lastIndexOf ( '1' ) - 1 ) <= ( s . indexOf ( '1' ) - 0 ) ) { pos = s . lastIndexOf ( '1' ) ; } else { pos = s . indexOf ( '1' ) ; }

import java . util . * ;   public class Test { public static void main ( String [ ] args ) {   Scanner input = new Scanner ( System . in ) ; int t = input . nextInt ( ) ;   while ( t -- > 0 ) {   int n = input . nextInt ( ) ; char [ ] s = input . next ( ) . toCharArray ( ) ;   int min = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s [ i ] == '1' ) { int temp = Math . min ( i , n - i - 1 ) ; if ( temp < min || min == - 1 ) { min = i ; } } }   int res = 0 ; if ( min > - 1 ) { int temp = Math . min ( min , n - 1 - min ) ; res += 2 * ( n - temp ) ; } System . out . println ( ( min > - 1 ) ? Math . max ( res , n ) : n ) ; } } }

import java . io . * ; import java . util . * ; public class Main { public static void main ( String args [ ] ) { FastReader input = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int T = input . nextInt ( ) ; while ( T -- > 0 ) { int n = input . nextInt ( ) ; String s = input . next ( ) ; int l = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s . charAt ( i ) == '1' ) { l = i ; break ; } } if ( l == - 1 ) { out . println ( n ) ; } else { int r = - 1 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( s . charAt ( i ) == '1' ) { r = i ; break ; } } int d1 = r + 1 ; int d2 = n - l ; out . println ( Math . max ( d1 * 2 , d2 * 2 ) ) ; } } 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 . util . * ; public class RoomsandStaircases {   public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int t1 = 1 ; t1 <= t ; t1 ++ ) { int n = sc . nextInt ( ) ; sc . nextLine ( ) ; String s = sc . nextLine ( ) ; int idx1 = s . indexOf ( "1" ) ; int idx2 = s . lastIndexOf ( "1" ) ; if ( idx2 == - 1 ) { System . out . println ( n ) ; continue ; } if ( idx2 == n - 1 || idx1 == 0 ) { System . out . println ( n * 2 ) ; continue ; } if ( idx1 == idx2 ) { int diff = n - idx2 ; if ( idx1 + 1 >= diff ) { System . out . println ( ( idx1 + 1 ) * 2 ) ; continue ; } else { System . out . println ( ( diff ) * 2 ) ; continue ; } } int diff = n - idx1 ; if ( diff >= idx2 + 1 ) { System . out . println ( ( diff ) * 2 ) ; continue ; } else { System . out . println ( ( idx2 + 1 ) * 2 ) ; continue ; } } sc . close ( ) ; } }

import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- != 0 ) { int len = sc . nextInt ( ) ; sc . nextLine ( ) ; String str = sc . nextLine ( ) ; int top0 = str . indexOf ( "0" ) ; int top1 = str . indexOf ( "1" ) ; int end0 = str . lastIndexOf ( "0" ) ; int end1 = str . lastIndexOf ( "1" ) ; if ( top0 == - 1 ) { System . out . println ( 2 * len ) ; continue ; } if ( top1 == - 1 ) { System . out . println ( len ) ; continue ; } int temp1 = Math . abs ( top0 - top1 ) + 1 ; int temp2 = Math . abs ( top0 - end1 ) + 1 ; int temp3 = Math . abs ( top1 - end0 ) + 1 ; int temp4 = Math . abs ( top1 - end1 ) + 1 ; int max = Math . max ( Math . max ( temp1 , temp2 ) , Math . max ( temp3 , temp4 ) ) ; System . out . println ( max * 2 ) ; } } }

from __future__ import division , print_functionfrom collections import * from math import * from itertools import * import osimport sysfrom io import BytesIO , IOBaseimport math NEW_LINE

t = int ( input ( ) )   def solve ( ) : n = int ( input ( ) ) s = input ( )   if all ( map ( lambda x : x == '0' , s ) ) : return n if all ( map ( lambda x : x == '1' , s ) ) : return n * 2   a = b = None for i in range ( n ) : if s [ i ] == '1' and a is None : a = i if s [ i ] == '1' : b = i   NEW_LINE

def read ( ) : return list ( map ( int , input ( ) . split ( ) ) )     def run ( ) : [ n ] = read ( ) s = input ( ) left = s . find ( '1' ) right = s [ : : - 1 ] . find ( '1' ) if left == - 1 : return n return 2 * n - 2 * min ( left , right )     [ t ] = read ( ) for i in range ( t ) : print ( run ( ) ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) li = input ( ) if li [ 0 ] == '1' or li [ - 1 ] == '1' : print ( n * 2 ) elif '1' not in li : print ( n ) else : k1 = n - li . index ( '1' ) k2 = li . rindex ( '1' ) + 1 res = max ( k1 * 2 , k2 * 2 ) print ( res ) NEW_LINE


import java . util . * ;   public class Program { public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) , m [ ] = new int [ 100001 ] ; for ( int i = 0 ; i < n ; i ++ ) { int x = in . nextInt ( ) , k = in . nextInt ( ) ; if ( m [ k ] < x ) { System . out . println ( " NO " ) ; return ; } else if ( m [ k ] == x ) m [ k ] ++ ; } System . out . println ( " YES " ) ; } }

import java . io . * ; import java . util . * ;   public final class Template {   private static int hashofIds [ ] = new int [ 100001 ] ;   public static void main ( String [ ] args ) { FastScanner sc = new FastScanner ( System . in ) ;   int n = sc . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int x = sc . nextInt ( ) ; int id = sc . nextInt ( ) ; if ( hashofIds [ id ] < x ) { System . out . println ( " NO " ) ; return ; } else if ( hashofIds [ id ] == x ) hashofIds [ id ] ++ ; } System . out . println ( " YES " ) ; } }   class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( InputStream stream ) { br = new BufferedReader ( new InputStreamReader ( stream ) ) ; }   public String next ( ) { while ( st == null || ! st . hasMoreElements ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } return st . nextToken ( ) ; }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   public long nextLong ( ) { return Long . parseLong ( next ( ) ) ; }   public double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   public String nextLine ( ) { String str = " " ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return str ; }   public int [ ] readArray ( int n ) { int [ ] a = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = nextInt ( ) ; return a ; } }

p = { } for i in range ( int ( input ( ) ) ) : x , k = map ( int , input ( ) . split ( ) ) if k in p : if x == p [ k ] + 1 : p [ k ] = x elif x > p [ k ] : print ( ' NO ' ) exit ( 0 ) elif x : print ( ' NO ' ) exit ( 0 ) else : p [ k ] = 0 print ( ' YES ' ) NEW_LINE

n = int ( input ( ) ) from collections import defaultdicta = defaultdict ( lambda : { - 1 } ) for i in range ( n ) : x , k = map ( int , input ( ) . split ( ) ) p = a [ k ] if x - 1 not in p : print ( ' NO ' ) break else : a [ k ] . add ( x ) else : print ( ' YES ' ) NEW_LINE

a = [ ] d = { } flag = 0 for t in range ( int ( input ( ) ) ) : x , y = map ( int , input ( ) . split ( ) ) if y in d . keys ( ) : if x == 0 and len ( d [ y ] ) == 0 : d [ y ] . append ( x ) if d [ y ] [ len ( d [ y ] ) - 1 ] + 1 == x : d [ y ] . append ( x ) elif x <= d [ y ] [ len ( d [ y ] ) - 1 ] : continue else : flag = 1 break else : d [ y ] = [ ] if x != 0 : flag = 1 break else : d [ y ] . append ( 0 )   if flag == 0 : print ( " YES " ) else : print ( " NO " )       NEW_LINE

def solve ( ) : n = int ( input ( ) ) p = True d = [ ] for _ in range ( int ( 1e5 + 1 ) ) : d . append ( set ( ) )   for _ in range ( n ) : x , k = map ( int , input ( ) . split ( ) ) if x > 0 and x - 1 not in d [ k ] : p = False else : d [ k ] . add ( x ) print ( ' YES ' if p else ' NO ' )     solve ( ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int ans = 0 ; int ele = sc . nextInt ( ) ; int r = ele % 10 ; ans = ( r - 1 ) * 10 ; int v = 0 ; while ( ele % 10 > 0 ) { v ++ ; ele = ele / 10 ; } ans = ans + ( v * ( v + 1 ) ) / 2 ; System . out . println ( ans ) ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class CF1433A { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; int [ ] arr = new int [ 10000 ] ; int ctr = 0 ; for ( int i = 1 ; i < 10 ; i ++ ) { String idx = " " ; for ( int j = 0 ; j < 4 ; j ++ ) { idx += i ; ctr += j + 1 ; arr [ Integer . parseInt ( idx ) ] = ctr ; } } while ( t -- > 0 ) { System . out . println ( arr [ Integer . parseInt ( br . readLine ( ) ) ] ) ; } } }

import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { BoringApartments ( ) ; }   public static void BoringApartments ( ) { Scanner mScanner = new Scanner ( System . in ) ; int task = mScanner . nextInt ( ) ; if ( task <= 36 && task >= 1 ) { for ( int i = 1 ; i <= task ; i ++ ) { int taskNumber = mScanner . nextInt ( ) ; if ( taskNumber >= 1 && taskNumber <= 9999 ) { if ( taskNumber % 10 == 1 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) ) ; } else if ( taskNumber % 10 == 2 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 10 ) ; } else if ( taskNumber % 10 == 3 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 20 ) ; } else if ( taskNumber % 10 == 4 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 30 ) ; } else if ( taskNumber % 10 == 5 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 40 ) ; } else if ( taskNumber % 10 == 6 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 50 ) ; } else if ( taskNumber % 10 == 7 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 60 ) ; } else if ( taskNumber % 10 == 8 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 70 ) ; } else if ( taskNumber % 10 == 9 ) { System . out . println ( TotalPressedCharacter ( taskNumber ) + 80 ) ; } } } } } static int TotalPressedCharacter ( int x ) { String cha = String . valueOf ( x ) ; int count = 0 ; for ( int n = 0 ; n < cha . length ( ) ; n ++ ) { if ( n == 0 ) { count = 1 ; } else if ( n == 1 ) { count = count + 2 ; } else if ( n == 2 ) { count = count + 3 ; } else if ( n == 3 ) { count = count + 4 ; } } return count ; } }

def main ( ) : t = int ( input ( ) ) NEW_LINE for _ in range ( t ) : n = input ( ) NEW_LINE total = ( 4 * ( int ( n [ 0 ] ) - 1 ) + len ( n ) ) NEW_LINE arr = [ ( i % 4 ) + 1 for i in range ( total ) ] NEW_LINE print ( sum ( arr ) )     if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : n = input ( ) NEW_LINE a = int ( n [ 0 ] ) NEW_LINE d = { 1 : 1 , 2 : 3 , 3 : 6 , 4 : 10 } NEW_LINE print ( ( a - 1 ) * 10 + d [ len ( n ) ] ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : a = ( ( input ( ) ) ) NEW_LINE b = str ( a [ 0 ] ) NEW_LINE b = int ( b ) NEW_LINE if len ( a ) == 1 : NEW_LINE INDENT print ( ( b - 1 ) * 10 + 1 ) elif len ( a ) == 2 : NEW_LINE print ( ( b - 1 ) * 10 + 3 ) elif len ( a ) == 3 : NEW_LINE print ( ( b - 1 ) * 10 + 6 ) else : NEW_LINE print ( b * 10 ) NEW_LINE DEDENT

t = int ( input ( ) ) NEW_LINE ans = [ ]   for _ in range ( t ) : s = input ( ) NEW_LINE c = 1 NEW_LINE start = '1'   while not ( start == s ) : if NEW_LINE int ( start + start [ 0 ] ) > 10000 : start = str ( int ( start [ 0 ] ) + 1 ) NEW_LINE c += len ( start ) NEW_LINE continue NEW_LINE start += start [ 0 ] NEW_LINE c += len ( start )   ans . append ( c )   for i in ans : print ( i ) NEW_LINE


import java . util . Scanner ;   public class A702 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = scanner . nextInt ( ) ; int a [ ] = new int [ n ] , t = 1 , max = 1 ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = scanner . nextInt ( ) ; } for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( a [ i ] < a [ i + 1 ] ) { t ++ ; } else { if ( max < t ) { max = t ; } t = 1 ; } }   if ( max < t ) { max = t ; } System . out . println ( max ) ; } }

import java . util . * ; import java . util . Scanner ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] arr = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = sc . nextInt ( ) ; } int max = 1 ; int maxHere = 1 ; for ( int i = 1 ; i < n ; i ++ ) { if ( arr [ i ] > arr [ i - 1 ] ) { maxHere ++ ; if ( maxHere > max ) max = maxHere ; } else maxHere = 1 ; } System . out . print ( max ) ; } }

import java . util . * ; import java . io . * ; import java . lang . * ;   public class Solution { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) a [ i ] = sc . nextInt ( ) ; int max = 1 ; int temp = 1 ; for ( int i = 1 ; i < n ; i ++ ) { if ( a [ i ] > a [ i - 1 ] ) temp ++ ; else temp = 1 ; if ( temp > max ) max = temp ; } System . out . println ( max ) ; } }

import java . util . Scanner ;   public class MaximumIncrease { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = Integer . parseInt ( scanner . nextLine ( ) ) ;   int [ ] arr = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = scanner . nextInt ( ) ; }   int currentMax = 1 ; int globalMax = 1 ; int prev = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { if ( arr [ i ] > prev ) { currentMax ++ ; } else { currentMax = 1 ; }   prev = arr [ i ] ;   if ( currentMax > globalMax ) { globalMax = currentMax ; }   }   System . out . println ( globalMax ) ; } }

n = int ( input ( ) ) arr = list ( map ( int , input ( ) . split ( ) ) ) j = 0 f = [ 0 ] * nfor i in range ( n - 1 ) : f [ j ] += 1 if arr [ i + 1 ] <= arr [ i ] : j = j + 1 if arr [ n - 1 ] >= arr [ n - 2 ] : f [ j ] += 1 f . sort ( ) print ( f [ n - 1 ] ) NEW_LINE

n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) c = 1 a = [ ] for i in range ( n - 1 ) : if ( l [ i ] < l [ i + 1 ] ) : c += 1 else : a . append ( c ) c = 1 a . append ( c ) print ( max ( a ) ) NEW_LINE

n = int ( input ( ) )   a = [ int ( x ) for x in input ( ) . split ( ) ]   max_length_local = 1   max_length = 1   i = 0   while i < ( n - 1 ) : if a [ i + 1 ] > a [ i ] : max_length_local += 1 else : max_length_local = 1   if max_length_local > max_length : max_length = max_length_local   i += 1   print ( max_length ) NEW_LINE

length = int ( input ( ) ) array = list ( map ( int , input ( ) . rstrip ( ) . split ( ) ) ) max_count , count = 1 , 1 for i in range ( 1 , length ) : if array [ i - 1 ] < array [ i ] : count += 1 if max_count < count : max_count = count else : count = 1   print ( max_count ) NEW_LINE


import com . sun . org . apache . bcel . internal . generic . AALOAD ; import com . sun . org . apache . bcel . internal . generic . GOTO ; 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 ; import static jdk . nashorn . internal . runtime . regexp . joni . Syntax . Java ;   public class Main {   public static void main ( String [ ] args ) throws IOException {   Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; String a [ ] = { " vaporeon " , " jolteon " , " flareon " , " espeon " , " umbreon " , " leafeon " , " glaceon " , " sylveon " } ; String s = input . next ( ) ; int count = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) >= ' a ' && s . charAt ( i ) <= ' z ' ) { count ++ ; } } for ( String string : a ) { if ( string . length ( ) == n ) { int now = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( string . charAt ( i ) == s . charAt ( i ) ) { now ++ ; } } if ( now == count ) { System . out . println ( string ) ; return ; } } } }   }

import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { String [ ] data = { " vaporeon " , " jolteon " , " flareon " , " espeon " , " umbreon " , " leafeon " , " glaceon " , " sylveon " } ; Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String str = sc . next ( ) ; char [ ] c = str . toCharArray ( ) ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( n != data [ i ] . length ( ) ) { continue ; } int count = 0 ; for ( int j = 0 ; j < c . length ; j ++ ) { if ( c [ j ] == data [ i ] . charAt ( j ) || c [ j ] == ' . ' ) { count ++ ; } else { break ; } } if ( count == n ) { System . out . println ( data [ i ] ) ; } } sc . close ( ) ; } }

import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { String [ ] data = { " vaporeon " , " jolteon " , " flareon " , " espeon " , " umbreon " , " leafeon " , " glaceon " , " sylveon " } ; Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String str = sc . next ( ) ; char [ ] c = str . toCharArray ( ) ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( n != data [ i ] . length ( ) ) { continue ; } int count = 0 ; char [ ] ch = data [ i ] . toCharArray ( ) ; for ( int j = 0 ; j < c . length ; j ++ ) { if ( c [ j ] == data [ i ] . charAt ( j ) || c [ j ] == ' . ' ) { count ++ ; } else { break ; } } if ( count == n ) { System . out . println ( data [ i ] ) ; } } } }

import java . util . Scanner ;   public class Eevee { public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; in . nextLine ( ) ; String inputString = in . nextLine ( ) ; String strings [ ] = { " vaporeon " , " jolteon " , " flareon " , " espeon " , " umbreon " , " leafeon " , " glaceon " , " sylveon " } ; for ( int i = 0 ; i < 8 ; i ++ ) { if ( strings [ i ] . matches ( inputString ) ) System . out . println ( strings [ i ] ) ; } } }

evolucion = [ ' vaporeon ' , ' jolteon ' , ' flareon ' , ' espeon ' , ' umbreon ' , ' leafeon ' , ' glaceon ' , ' sylveon ' ]   longitud = int ( input ( ) ) palabra = input ( )   if longitud == 8 : print ( ' vaporeon ' ) elif longitud == 6 : print ( ' espeon ' ) else : indices = [ ] for i in range ( longitud ) : if palabra [ i ] != ' . ' : indices . append ( i )   respuesta = None i = 0 while i < 8 and respuesta is None : es_la_palabra = True for j in range ( len ( indices ) ) : es_la_palabra = es_la_palabra and ( palabra [ indices [ j ] ] == evolucion [ i ] [ indices [ j ] ] ) if es_la_palabra : respuesta = evolucion [ i ] i = i + 1 print ( respuesta ) NEW_LINE

import sysa = \ [ ' vaporeon ' , ' jolteon ' , ' flareon ' , ' espeon ' , ' umbreon ' , ' leafeon ' , ' glaceon ' , ' sylveon ' ] n = int ( input ( ) ) s = input ( ) for i in a : if len ( i ) == n : ss = 0 for x in range ( n ) : if s [ x ] == i [ x ] : ss += 1 if ss == n - s . count ( ' . ' ) : print ( i )   NEW_LINE

n = int ( input ( ) ) s = str ( input ( ) ) l = [ " vaporeon " , " jolteon " , " flareon " , " espeon " , " umbreon " , " leafeon " , " glaceon " , " sylveon " ] for e in l : if len ( e ) == len ( s ) and all ( s [ i ] == ' . ' or s [ i ] == e [ i ] for i in range ( n ) ) : print ( e ) exit ( ) NEW_LINE

import re   arr = " Vaporeon , ▁ Jolteon , ▁ Flareon , ▁ Espeon , ▁ Umbreon , ▁ Leafeon , ▁ Glaceon , ▁ Sylveon " . split ( " , ▁ " )   n = int ( input ( ) ) s = input ( ) s = s . replace ( ' . ' , ' ( . * ) ' ) for i in range ( len ( arr ) ) : arr [ i ] = arr [ i ] . lower ( )   for i in arr : if re . match ( s , i ) and len ( i ) == n : print ( i ) break   NEW_LINE


import java . io . * ; import java . util . * ;   public class C {   static ArrayList < Integer > adj [ ] ;   static int dist , b , max , q ;   static void dfs ( int u , int p , int h ) {   if ( max <= h ) { max = h ; q = u ; } for ( int v : adj [ u ] ) { if ( v != p ) { dfs ( v , u , h + 1 ) ; if ( v == b ) dist = h + 1 ; } } }   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 a = sc . nextInt ( ) - 1 ; b = sc . nextInt ( ) - 1 ; int da = sc . nextInt ( ) ; int db = sc . nextInt ( ) ; adj = new ArrayList [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { adj [ i ] = new ArrayList < > ( ) ; } for ( int i = 0 ; i < n - 1 ; i ++ ) { int u = sc . nextInt ( ) - 1 ; int v = sc . nextInt ( ) - 1 ; adj [ u ] . add ( v ) ; adj [ v ] . add ( u ) ; } max = 0 ; q = 0 ; dist = 0 ; dfs ( a , - 1 , 0 ) ; int y = dist ; dfs ( q , - 1 , 0 ) ; dist = y ; if ( dist <= da ) { pw . println ( " Alice " ) ; } else if ( 2 * da >= max ) { pw . println ( " Alice " ) ;   } else { if ( db > 2 * da ) { pw . println ( " Bob " ) ;   } else { pw . println ( " Alice " ) ;   } } } pw . flush ( ) ; }

import java . util . * ;   import javax . swing . plaf . basic . BasicScrollPaneUI . HSBChangeListener ;   import java . io . * ;   public class A { static BufferedReader br ; static PrintWriter pw ; static int inf = ( int ) 1e9 ; static long mod = ( long ) 1e9 + 7 ;   static ArrayList < Integer > [ ] g ; static int n ; static char [ ] [ ] a ; static boolean [ ] [ ] vis ;   public static void main ( String [ ] args ) throws NumberFormatException , IOException , InterruptedException {

from sys import stdin for _ in range ( int ( input ( ) ) ) : n , a , b , da , db = map ( int , input ( ) . split ( ) ) a -= 1 b -= 1 go = [ [ ] for _ in range ( n ) ] for _ in range ( n - 1 ) : x , y = map ( int , stdin . readline ( ) . split ( ) ) x -= 1 y -= 1 go [ x ] . append ( y ) go [ y ] . append ( x ) MAX = 0 def f ( pre , node , level ) : global MAX , dis re = [ 0 , 0 ] if node == b : dis = level for x in go [ node ] : if pre != x : re . append ( f ( node , x , level + 1 ) ) re . sort ( ) MAX = max ( MAX , re [ - 1 ] + re [ - 2 ] ) return re [ - 1 ] + 1 f ( - 1 , a , 0 ) if dis <= da or da * 2 >= db or da * 2 >= MAX : print ( ' Alice ' ) else : print ( ' Bob ' )

from _collections import deque NEW_LINE def dist ( G , n , s ) : D = [ None ] * n NEW_LINE D [ s ] = 0 NEW_LINE Q = deque ( ) NEW_LINE Q . append ( s ) NEW_LINE while Q : f = Q . popleft ( ) NEW_LINE for t in G [ f ] : if NEW_LINE D [ t ] is None : D [ t ] = D [ f ] + 1 ; NEW_LINE Q . append ( t ) NEW_LINE return D NEW_LINE for _ in range ( int ( input ( ) ) ) : n , a , b , da , db = map ( int , input ( ) . split ( ) ) NEW_LINE a -= 1 ; NEW_LINE b -= 1 ; NEW_LINE G = [ [ ] for _ in range ( n ) ] NEW_LINE for _ in range ( n - 1 ) : u , v = map ( int , input ( ) . split ( ) ) NEW_LINE G [ u - 1 ] . append ( v - 1 ) NEW_LINE G [ v - 1 ] . append ( u - 1 ) NEW_LINE D = dist ( G , n , a ) NEW_LINE me = max ( enumerate ( D ) , key = lambda x : x [ 1 ] ) [ 0 ] NEW_LINE print ( ' Alice ' ) if D [ b ] <= da or db <= 2 * da or max ( dist ( G , n , me ) ) <= 2 * da else print ( ' Bob ' ) NEW_LINE

from sys import stdin NEW_LINE for _ in range ( int ( input ( ) ) ) : n , a , b , da , db = map ( int , input ( ) . split ( ) ) NEW_LINE a -= 1 NEW_LINE b -= 1 NEW_LINE go = [ [ ] for _ in range ( n ) ] NEW_LINE for _ in range ( n - 1 ) : x , y = map ( int , stdin . readline ( ) . split ( ) ) NEW_LINE x -= 1 NEW_LINE y -= 1 NEW_LINE go [ x ] . append ( y ) NEW_LINE go [ y ] . append ( x ) NEW_LINE MAX = 0 NEW_LINE def f ( pre , node , level ) : global MAX , dis NEW_LINE re = [ 0 , 0 ] NEW_LINE if node == b : dis = level NEW_LINE for x in go [ node ] : if NEW_LINE pre != x : re . append ( f ( node , x , level + 1 ) ) NEW_LINE re . sort ( ) NEW_LINE MAX = max ( MAX , re [ - 1 ] + re [ - 2 ] ) NEW_LINE return re [ - 1 ] + 1 NEW_LINE f ( - 1 , a , 0 ) NEW_LINE if dis <= da or da * 2 >= db or da * 2 >= MAX : NEW_LINE INDENT print ( ' Alice ' ) else : NEW_LINE print ( ' Bob ' ) NEW_LINE DEDENT


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class CF1370A { 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 ) { System . out . println ( Integer . parseInt ( br . readLine ( ) ) / 2 ) ; } } }

import java . util . * ; public class f { public static void main ( String [ ] a ) { Scanner sc = new Scanner ( System . in ) ; if ( sc . hasNext ( ) ) { int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; System . out . println ( n / 2 ) ;    }   } } }

import java . util . Scanner ;   public class MaximumGCD { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int test = sc . nextInt ( ) ; for ( int i = 0 ; i < test ; i ++ ) { int num = sc . nextInt ( ) ; System . out . println ( num / 2 ) ; } } }

import java . util . Scanner ; import java . lang . Math ; import java . util . Arrays ;   public class pa { static Scanner sc = new Scanner ( System . in ) ; public static void main ( String args [ ] ) { int t = sc . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int n = sc . nextInt ( ) ; System . out . println ( n / 2 ) ; } } }

import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = scanner . nextInt ( ) ; while ( t -- > 0 ) { int n = scanner . nextInt ( ) ; System . out . println ( n % 2 == 0 ? n / 2 : ( n - 1 ) / 2 ) ; } } }

for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) print ( n // 2 ) NEW_LINE

for ti in range ( int ( input ( ) ) ) : print ( int ( input ( ) ) // 2 ) NEW_LINE

t = int ( input ( ) )   for _ in range ( t ) : n = int ( input ( ) ) print ( n // 2 )   NEW_LINE

for _ in range ( int ( input ( ) ) ) : print ( int ( input ( ) ) // 2 ) NEW_LINE

import math     def main ( ) : t = int ( input ( ) ) for _ in range ( t ) : n = int ( input ( ) ) print ( n // 2 )     if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


import java . util . * ; public class practice { public static void main ( String [ ] args ) { Scanner scn = new Scanner ( System . in ) ; long k = scn . nextLong ( ) , b = scn . nextLong ( ) , n = scn . nextLong ( ) , t = scn . nextLong ( ) ; long z = 1 , time = 0 ; ; while ( z <= t ) { z = z * k + b ; time ++ ; } long ans = n - time + 1 ; if ( ans < 0 ) { ans = 0 ; } System . out . println ( ans ) ; } }

k , b , n , t = [ int ( x ) for x in input ( ) . split ( " ▁ " ) ] z = 1 while k * z + b <= t : z = k * z + b n -= 1 print ( max ( n , 0 ) ) NEW_LINE

import mathk , b , n , t = list ( map ( int , input ( ) . split ( ) ) ) if k > 1 : ans = math . ceil ( n - math . log ( ( t + b / ( k - 1 ) ) / ( 1 + b / ( k - 1 ) ) ) / math . log ( k ) ) print ( max ( 0 , ans ) ) else : z = 1 + n * b f = 1 ans = 0 while f : if t + ans * b >= z : f = 0 break else : ans = ans + 1 print ( ans ) NEW_LINE


import java . util . * ; import java . io . * ; import java . math . * ;   public class x223B { public static void main ( String hi [ ] ) throws Exception { BufferedReader infile = new BufferedReader ( new InputStreamReader ( System . in ) ) ; char [ ] arr = infile . readLine ( ) . toCharArray ( ) ; char [ ] brr = infile . readLine ( ) . toCharArray ( ) ; int N = arr . length ; int M = brr . length ; if ( N < M || bad ( arr , brr ) ) System . out . println ( " No " ) ; else { int [ ] left = new int [ N ] ; int [ ] right = new int [ N ] ; int [ ] place = new int [ 26 ] ; Arrays . fill ( place , N + M + M + N ) ; int dex = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( dex < M && arr [ i ] == brr [ dex ] ) { left [ i ] = place [ arr [ i ] - ' a ' ] = dex ; dex ++ ; } else left [ i ] = place [ arr [ i ] - ' a ' ] ; } dex = M - 1 ; place = new int [ 26 ] ; Arrays . fill ( place , N + M + M + N ) ; for ( int i = N - 1 ; i >= 0 ; i -- ) { if ( dex >= 0 && arr [ i ] == brr [ dex ] ) { right [ i ] = place [ arr [ i ] - ' a ' ] = dex ; dex -- ; } else right [ i ] = place [ arr [ i ] - ' a ' ] ; } String res = " Yes " ; for ( int i = 0 ; i < N ; i ++ ) if ( right [ i ] > left [ i ] ) res = " No " ; System . out . println ( res ) ; } } public static boolean bad ( char [ ] a , char [ ] b ) { HashSet < Character > set = new HashSet < Character > ( ) ; for ( char c : b ) set . add ( c ) ; for ( char c : a ) if ( ! set . contains ( c ) ) return true ; return false ; } }

import java . io . * ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . util . * ;   public class Task2 {   public static void main ( String [ ] args ) throws IOException {   new Task2 ( ) . solve ( ) ;   }   int mod = 1000000007 ;   PrintWriter out ;   int n ; int m ;   ArrayList < Integer > [ ] g ;   void solve ( ) throws IOException {

import bisectimport string   s = input ( ) t = input ( )   max_match = [ 0 for i in range ( len ( s ) ) ] min_match = [ 0 for i in range ( len ( s ) ) ] char_idx = [ 0 for i in range ( 30 ) ] char_occur = [ [ ] for i in range ( 30 ) ]   for ( i , ch ) in enumerate ( t ) : idx = ord ( ch ) - ord ( ' a ' ) char_occur [ idx ] . append ( i )   for ch in string . ascii_lowercase : idx = ord ( ch ) - ord ( ' a ' ) char_occur [ idx ] . append ( len ( t ) + 1 )   matched = - 1 for ( i , ch ) in enumerate ( s ) : if matched == len ( t ) - 1 : max_match [ i ] = matched else : if ch == t [ matched + 1 ] : matched += 1 max_match [ i ] = matched   matched = len ( t ) for ( i , ch ) in enumerate ( s [ : : - 1 ] ) : i = len ( s ) - i - 1 if matched == 0 : min_match [ i ] = matched else : if ch == t [ matched - 1 ] : matched -= 1 min_match [ i ] = matched   for ( i , ch ) in enumerate ( s ) : low = min_match [ i ] high = max_match [ i ] ch = ord ( ch ) - ord ( ' a ' ) idx = char_idx [ ch ] while idx < len ( char_occur [ ch ] ) and char_occur [ ch ] [ idx ] < low : idx += 1 char_idx [ ch ] = idx if idx == len ( char_occur [ ch ] ) : print ( " No " ) exit ( ) if char_occur [ ch ] [ idx ] > high : print ( " No " ) exit ( )   print ( " Yes " ) NEW_LINE


import java . util . Scanner ;   public class _0613LittleArtem {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int cases = sc . nextInt ( ) ; while ( cases > 0 ) { int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; boolean flag = true ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( n % 2 == 0 || m % 2 == 0 ) { if ( i == n - 1 && j == m - 2 || i == n - 1 && j == m - 1 ) { System . out . print ( " B " ) ; continue ; } } if ( flag ) { System . out . print ( " B " ) ; flag = ! flag ; } else { System . out . print ( " W " ) ; flag = ! flag ; } } if ( m % 2 == 0 ) { flag = ! flag ; } System . out . println ( ) ; } cases -- ; } }   }

import java . util . * ; public class file { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int test = scan . nextInt ( ) ; for ( int i = 0 ; i < test ; i ++ ) { int a = scan . nextInt ( ) ; int b = scan . nextInt ( ) ; for ( int k = 0 ; k < a ; k ++ ) { for ( int j = 0 ; j < b ; j ++ ) { if ( k == 0 && j == 0 ) { System . out . print ( " W " ) ; } else { System . out . print ( " B " ) ; } } System . out . println ( " " ) ; } } } }

import java . io . BufferedReader ; import java . util . Collections ; 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 Main { public static void main ( String [ ] args ) throws IOException { PrintWriter pw = new PrintWriter ( System . out ) ; Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; for ( int y = 0 ; y < t ; y ++ ) { int r = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; for ( int i = 0 ; i < r ; i ++ ) { for ( int j = 0 ; j < c ; j ++ ) { if ( i == 0 && j == 0 ) { pw . print ( " W " ) ; } else pw . print ( " B " ) ; } pw . println ( ) ; } } pw . close ( ) ; } static class Scanner { StringTokenizer st ; BufferedReader br ; public Scanner ( InputStream s ) { br = new BufferedReader ( new InputStreamReader ( s ) ) ; } public Scanner ( String file ) throws FileNotFoundException { br = new BufferedReader ( new FileReader ( file ) ) ; } public String next ( ) throws IOException { while ( st == null || ! st . hasMoreTokens ( ) ) st = new StringTokenizer ( br . readLine ( ) ) ; return st . nextToken ( ) ; } public int nextInt ( ) throws IOException { return Integer . parseInt ( next ( ) ) ; } public long nextLong ( ) throws IOException { return Long . parseLong ( next ( ) ) ; } public String nextLine ( ) throws IOException { return br . readLine ( ) ; } public double nextDouble ( ) throws IOException { return Double . parseDouble ( next ( ) ) ; } public boolean ready ( ) throws IOException { return br . ready ( ) ; } } }

import java . util . * ;   public class LittleArtern {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { String s = " B " ; for ( int j = 0 ; j < m - 1 ; j ++ ) { if ( i == n - 1 ) { s += ' B ' ; } else s += ' W ' ; } System . out . println ( s ) ; } }   }   }

for _ in range ( int ( input ( ) ) ) : c , r = map ( int , input ( ) . split ( ) ) grid = [ [ ] for _ in range ( c ) ] grid [ 0 ] . append ( ' W ' ) for i in grid : for _ in range ( r ) : i . append ( ' B ' ) grid [ 0 ] . remove ( grid [ 0 ] [ - 1 ] ) for i in grid : print ( ' ' . join ( i ) ) NEW_LINE

t = int ( input ( ' ' ) ) for i in range ( t ) : n , m = map ( int , input ( ' ' ) . split ( ' ▁ ' ) ) table = [ ] vmi = False black = 0 hossz = 0 for j in range ( n ) : tmp = [ ] if ( vmi == False ) : vmi = True else : vmi = False for k in range ( m ) : if ( vmi ) : if ( k % 2 == 0 ) : tmp . append ( ' B ' ) else : tmp . append ( ' W ' ) else : if ( k % 2 == 0 ) : tmp . append ( ' W ' ) else : tmp . append ( ' B ' ) table . append ( tmp ) black = tmp . count ( ' B ' ) if ( m * n % 2 == 0 ) : if ( m * n - black + 1 != black ) : vmi = False for j in range ( len ( table ) - 1 , - 1 , - 1 ) : if ( vmi ) : break for k in range ( len ( table [ j ] ) - 1 , - 1 , - 1 ) : if ( table [ j ] [ k ] == ' W ' ) : table [ j ] [ k ] = ' B ' vmi = True break for j in table : print ( ' ' . join ( j ) ) NEW_LINE

t = int ( input ( ) )   for tc in range ( t ) : n , m = map ( int , input ( ) . split ( ) ) print ( ' W ' + ' B ' * ( m - 1 ) ) for x in range ( n - 1 ) : print ( ' B ' * m )       NEW_LINE

for _ in range ( int ( input ( ) ) ) : n , m = map ( int , input ( ) . split ( ) ) for i in range ( n ) : for j in range ( m ) : if i == 0 and j == 0 : print ( ' W ' , end = ' ' ) else : print ( ' B ' , end = ' ' ) print ( ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . ArrayList ; import java . util . Collections ; import java . util . StringTokenizer ;   public class B { public static void main ( String [ ] args ) { FastScanner fs = new FastScanner ( ) ; int t = fs . nextInt ( ) ; while ( t -- > 0 ) { int n = fs . nextInt ( ) ; ArrayList < Integer > a = new ArrayList < > ( ) ; String ans = " NO " ; if ( n % 4 == 0 ) ans = " YES " ; System . out . println ( ans ) ; } } 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 [ ] 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 . Scanner ;   public class FashionableLee { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int test = sc . nextInt ( ) ; for ( int i = 0 ; i < test ; i ++ ) { long side = sc . nextInt ( ) ; if ( side % 4 == 0 ) { System . out . println ( " YES " ) ; } else { System . out . println ( " NO " ) ; } } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . HashSet ; import java . util . LinkedList ; import java . util . List ; import java . util . Map ; import java . util . Set ;   public class Main { 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 ; } }   public static void main ( String [ ] args ) { FastReader sc = new FastReader ( ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int a = sc . nextInt ( ) ; if ( ( a - 4 ) % 4 == 0 ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; }   }   }

import java . util . Scanner ;   public class A1369 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = scanner . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int n = scanner . nextInt ( ) ; if ( n % 4 == 0 ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; } } }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class CF1369A { 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 ) { System . out . println ( ( Integer . parseInt ( br . readLine ( ) ) % 4 ) == 0 ? " YES " : " NO " ) ; } } }

def main ( ) : t = int ( input ( ) ) for _ in range ( t ) : n = int ( input ( ) ) if n % 4 == 0 : print ( " YES " ) else : print ( " NO " )     if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE

t = int ( input ( ) ) for i in range ( t ) : a = int ( input ( ) ) if a % 4 == 0 : print ( " YES " ) else : print ( " NO " ) NEW_LINE

for _ in range ( int ( input ( ) ) ) : print ( " YES " if int ( input ( ) ) % 4 == 0 else " NO " ) NEW_LINE

from collections import Counter   def solve ( ) : n = int ( input ( ) )   if n % 4 : return " NO "   return " YES "     for i in range ( int ( input ( ) ) ) : print ( solve ( ) ) NEW_LINE

for i in range ( int ( input ( ) ) ) : if int ( input ( ) ) % 4 == 0 : print ( " YES " ) else : print ( " NO " ) NEW_LINE


import java . util . * ;   public class solution { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; int res = - 1 ; for ( int i = 0 ; i <= n / a ; i ++ ) { for ( int j = 0 ; j * b + i * a <= n ; j ++ ) { if ( ( n - ( j * b + i * a ) ) % c == 0 ) { res = Math . max ( res , ( i + j + ( n - ( j * b + i * a ) ) / c ) ) ; } } } System . out . println ( res ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int c = sc . nextInt ( ) ; int ans = 1 ; for ( int i = 0 ; i <= n ; i ++ ) { int g = n - i * a ;

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

import javax . print . DocFlavor ; import javax . swing . * ; import java . awt . image . BandedSampleModel ; import java . util . * ;   public class Example { static int [ ] dp ;

import syssys . setrecursionlimit ( 5000 )     def max_ribbon_cuts ( target_sum , numbers ) : memo = { }   def helper ( target_sum , numbers ) : if target_sum in memo : return memo [ target_sum ]   if target_sum == 0 : return [ ]   if target_sum < 0 : return None   shortest_combination = None for num in numbers : remainder = target_sum - num remiander_combination = helper ( remainder , numbers )   if remiander_combination != None : combination = remiander_combination + [ num ]   if ( shortest_combination == None or len ( shortest_combination ) < len ( combination ) ) : shortest_combination = combination   memo [ target_sum ] = shortest_combination return memo [ target_sum ]   return helper ( target_sum , numbers )     user_inputs = list ( map ( eval , input ( ) . split ( " ▁ " ) ) )   print ( len ( max_ribbon_cuts ( user_inputs [ 0 ] , user_inputs [ 1 : ] ) ) ) NEW_LINE

n , a , b , c = map ( int , input ( ) . split ( ) ) memory = [ False ] * ( n + 1 )   memory [ 0 ] = 0 t = min ( a , b , c )   for i in range ( 1 , t ) : memory [ i ] = - 9999999999       for i in range ( t , n + 1 ) : maks = 0 if i - a >= 0 : maks = max ( maks , memory [ i - a ] + 1 ) if i - b >= 0 : maks = max ( maks , memory [ i - b ] + 1 ) if i - c >= 0 : maks = max ( maks , memory [ i - c ] + 1 )   maks = maks if maks != 0 else - 9999999999 memory [ i ] = maksprint ( memory [ n ] )     NEW_LINE

n , a , b , c = map ( int , input ( ) . split ( ) ) dp = [ float ( " - inf " ) for i in range ( n + 1 ) ] if a <= n : dp [ a ] = 1 if b <= n : dp [ b ] = 1 if c <= n : dp [ c ] = 1 for i in range ( 1 , n + 1 ) : if i - a >= 0 : dp [ i ] = max ( dp [ i ] , 1 + dp [ i - a ] ) if i - b >= 0 : dp [ i ] = max ( dp [ i ] , 1 + dp [ i - b ] ) if i - c >= 0 : dp [ i ] = max ( dp [ i ] , 1 + dp [ i - c ] ) print ( dp [ - 1 ] ) NEW_LINE


import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int a [ ] = new int [ n ] ; int flag = 0 ; ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = sc . nextInt ( ) ; } for ( int i = 0 ; i < n ; i ++ ) { flag = 0 ; for ( int j = 0 ; j <= a [ i ] / 3 ; j ++ ) { if ( ( a [ i ] - 3 * j ) % 7 == 0 ) { flag = 1 ; break ; } } if ( flag == 0 ) System . out . println ( " NO " ) ; else System . out . println ( " YES " ) ; }   }   }

cases = int ( input ( ) )   pool = { 1 , 2 , 4 , 5 , 8 , 11 }   while cases : cases -= 1 num = int ( input ( ) )   if num < 3 : print ( " NO " ) else : step = 0 found = False while 3 * step <= num : if ( num - 3 * step ) % 7 == 0 : print ( " YES " ) found = True break step += 1 if not found : print ( " NO " ) NEW_LINE

n = int ( input ( ) ) for i in range ( n ) : a = int ( input ( ) ) a -= ( a % 3 ) * 7 if a < 0 : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE

n = int ( input ( " " ) ) A = [ ] for i in range ( n ) : x = int ( input ( " " ) ) A . append ( x ) for i in A : if ( i % 3 == 0 or i % 7 == 0 or i % 10 == 0 ) : print ( ' YES ' ) else : if ( i > 12 ) : print ( ' YES ' ) else : print ( " NO " ) NEW_LINE

li = [ 1 , 2 , 4 , 5 , 8 , 11 ] n = int ( input ( ) ) for i in range ( n ) : a = int ( input ( ) ) if a in li : print ( ' NO ' ) else : print ( ' YES ' ) NEW_LINE

cases = int ( input ( ) )   pool = { 1 , 2 , 4 , 5 , 8 , 11 }   while cases : cases -= 1 num = int ( input ( ) ) if num not in pool : print ( " YES " ) else : print ( " NO " ) NEW_LINE


import java . util . ArrayList ; import java . util . List ; import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int num = scanner . nextInt ( ) ; List < Integer > list1 = new ArrayList < > ( ) ; List < Integer > list2 = new ArrayList < > ( ) ; List < Integer > list3 = new ArrayList < > ( ) ; for ( int i = 0 ; i < num ; i ++ ) { int n = scanner . nextInt ( ) ; list1 . add ( n ) ; } for ( int j = 0 ; j < num - 1 ; j ++ ) { int n = scanner . nextInt ( ) ; list2 . add ( n ) ; } for ( int j = 0 ; j < num - 2 ; j ++ ) { int n = scanner . nextInt ( ) ; list3 . add ( n ) ; } System . out . println ( compareList ( list1 , list2 ) ) ; System . out . println ( compareList ( list2 , list3 ) ) ; }   private static int compareList ( List < Integer > list1 , List < Integer > list2 ) { int result = 0 ; for ( int i = 0 ; i < list1 . size ( ) ; i ++ ) { result = result ^ list1 . get ( i ) ; } for ( int j = 0 ; j < list2 . size ( ) ; j ++ ) { result = result ^ list2 . get ( j ) ; } return result ; }   }

import java . io . * ; import java . math . BigDecimal ; import java . math . BigInteger ; import java . math . MathContext ; import java . util . * ;   public class CodeForces { public static void main ( String [ ] args ) throws IOException { Scanner scan = new Scanner ( System . in ) ;   int n = scan . nextInt ( ) ;   int a [ ] = new int [ n ] ; int b [ ] = new int [ n - 1 ] ; int c [ ] = new int [ n - 2 ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = scan . nextInt ( ) ; } for ( int i = 0 ; i < n - 1 ; i ++ ) { b [ i ] = scan . nextInt ( ) ; } for ( int i = 0 ; i < n - 2 ; i ++ ) { c [ i ] = scan . nextInt ( ) ; } Arrays . sort ( a ) ; Arrays . sort ( b ) ; Arrays . sort ( c ) ; int flag [ ] = new int [ 2 ] ; for ( int i = 0 ; i < n ; i ++ ) {

import java . io . * ; import java . util . * ; public class ACM { public static void main ( String args [ ] ) throws FileNotFoundException , IOException { Scanner x = new Scanner ( System . in ) ; int n = x . nextInt ( ) ; int [ ] arr = new int [ n ] ; int [ ] arr2 = new int [ n - 1 ] ; int [ ] arr3 = new int [ n - 2 ] ; int First = 0 ; int Sec = 0 ; for ( int i = 0 ; i < arr . length ; i ++ ) { arr [ i ] = x . nextInt ( ) ; } for ( int i = 0 ; i < arr2 . length ; i ++ ) { arr2 [ i ] = x . nextInt ( ) ; } for ( int i = 0 ; i < arr3 . length ; i ++ ) { arr3 [ i ] = x . nextInt ( ) ; } Arrays . sort ( arr ) ; Arrays . sort ( arr2 ) ; Arrays . sort ( arr3 ) ; for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( arr [ i ] != arr2 [ i ] ) { First = arr [ i ] ; break ; } else { if ( i == n - 2 ) { First = arr [ n - 1 ] ; } } } for ( int i = 0 ; i < n - 2 ; i ++ ) { if ( arr2 [ i ] != arr3 [ i ] ) { Sec = arr2 [ i ] ; break ; } else { if ( i == n - 3 ) { Sec = arr2 [ n - 2 ] ; } } } System . out . println ( First ) ; System . out . println ( Sec ) ; } }

import java . util . Comparator ; import java . util . LinkedList ; import java . util . Scanner ;   public class AAndBAndCompilationErrors { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int testCase = scanner . nextInt ( ) ; LinkedList < Integer > list = new LinkedList < > ( ) ; LinkedList < Integer > list1 = new LinkedList < > ( ) ; LinkedList < Integer > list2 = new LinkedList < > ( ) ;   for ( int i = 0 ; i < testCase ; i ++ ) { list . add ( scanner . nextInt ( ) ) ; } for ( int i = 0 ; i < testCase - 1 ; i ++ ) { list1 . add ( scanner . nextInt ( ) ) ; } for ( int i = 0 ; i < testCase - 2 ; i ++ ) { list2 . add ( scanner . nextInt ( ) ) ; } list . sort ( Comparator . comparingInt ( o -> o ) ) ; list1 . sort ( Comparator . comparingInt ( o -> o ) ) ; list2 . sort ( Comparator . comparingInt ( o -> o ) ) ; helper ( list , list1 ) ; helper ( list1 , list2 ) ; }   public static void helper ( LinkedList < Integer > list , LinkedList < Integer > list1 ) { for ( Integer integer : list1 ) { list . remove ( integer ) ; } System . out . println ( list . get ( 0 ) ) ; } }

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) b = list ( map ( int , input ( ) . split ( ) ) ) c = list ( map ( int , input ( ) . split ( ) ) ) print ( sum ( a ) - sum ( b ) ) print ( sum ( b ) - sum ( c ) ) NEW_LINE

n = input ( ) a = sum ( map ( int , input ( ) . split ( ) ) ) b = sum ( map ( int , input ( ) . split ( ) ) ) c = sum ( map ( int , input ( ) . split ( ) ) ) print ( a - b , b - c ) NEW_LINE

from collections import Counter_ = input ( ) a = Counter ( [ int ( i ) for i in input ( ) . split ( ) ] ) b = Counter ( [ int ( i ) for i in input ( ) . split ( ) ] ) c = Counter ( [ int ( i ) for i in input ( ) . split ( ) ] ) for k in a . keys ( ) : if a . get ( k , 0 ) != b . get ( k , 0 ) : print ( k ) for k in b . keys ( ) : if b . get ( k , 0 ) != c . get ( k , 0 ) : print ( k ) NEW_LINE

n = int ( input ( ) ) first = [ int ( x ) for x in input ( ) . split ( ) ] second = [ int ( x ) for x in input ( ) . split ( ) ] third = [ int ( x ) for x in input ( ) . split ( ) ] first . sort ( ) , second . sort ( ) , third . sort ( ) for i in range ( n - 1 ) : if first [ i ] != second [ i ] : print ( first [ i ] ) count = 1 break else : count = 0 if count == 0 and i == n - 2 : print ( first [ n - 1 ] ) for j in range ( n - 2 ) : if second [ j ] != third [ j ] : print ( second [ j ] ) count = 1 break else : count = 0 if count == 0 and j == n - 3 : print ( second [ n - 2 ] ) NEW_LINE

input ( ) l = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] a = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] b = [ int ( i ) for i in input ( ) . split ( " ▁ " ) ] print ( sum ( l ) - sum ( a ) ) print ( sum ( a ) - sum ( b ) ) NEW_LINE


import java . util . * ;   public class JavaApplication6 {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; String s = new String ( ) ; int m ; m = in . nextInt ( ) ; s = in . next ( ) ; System . out . println ( ( int ) ( s . length ( ) + 1 ) ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String n = sc . nextLine ( ) ; String s = sc . nextLine ( ) ; System . out . println ( s . length ( ) + 1 ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String n = sc . nextLine ( ) ; String s = sc . nextLine ( ) ; int Lout = 0 , Rout = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == 76 ) { Lout ++ ; } else { Rout ++ ; } } System . out . println ( Rout + Lout + 1 ) ; } }

import java . util . * ;   public class Main {   public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int n = Integer . valueOf ( scanner . nextLine ( ) ) ; scanner . nextLine ( ) ; System . out . println ( n + 1 ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ; System . out . println ( n + 1 ) ; } }

n = int ( input ( ) ) s = input ( ) print ( n + 1 ) NEW_LINE

n = int ( input ( ) ) s = input ( ) x = s . count ( " L " ) y = s . count ( " R " ) print ( y + x + 1 ) NEW_LINE

import ren = int ( input ( ) ) x = input ( ) a = len ( re . findall ( ' L ' , x ) ) b = len ( re . findall ( ' R ' , x ) ) d = - 1 * ac = b - aprint ( b - d + 1 ) NEW_LINE

import redef post ( n , x ) : a = len ( re . findall ( ' L ' , x ) ) b = len ( re . findall ( ' R ' , x ) ) return a + b + 1 t = int ( input ( ) ) y = input ( ) r = post ( t , y ) print ( r ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . io . * ;   public class Code { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner sc = new Scanner ( System . in ) ; int q = sc . nextInt ( ) ; while ( q > 0 ) { q -- ; long n = sc . nextLong ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; long cost = 0 ; if ( n % 2 == 0 ) { if ( a * 2 <= b ) { cost = a * n ; } else { cost = ( b * n ) / 2 ; } } else { cost = a ; if ( a * 2 <= b ) { cost = cost + a * ( n - 1 ) ; } else { cost = cost + ( b * ( n - 1 ) ) / 2 ; } } System . out . println ( cost ) ; } } }

import java . util . Scanner ;   public class eularian { public static long solve ( long n , long a , long b ) { if ( n % 2 == 0 ) { long ans1 = n * a ; long ans2 = ( n / 2 ) * b ; return Math . min ( ans2 , ans1 ) ; } else { long ans1 = ( n - 1 ) * a ; long ans2 = ( ( n - 1 ) / 2 ) * b ; return Math . min ( ans2 , ans1 ) + a ; } } public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { long n = sc . nextLong ( ) ; long a = sc . nextLong ( ) ; long b = sc . nextLong ( ) ; System . out . println ( solve ( n , a , b ) ) ; } } }

import java . util . * ;   public class questionCF {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;   int q = sc . nextInt ( ) ; while ( q -- > 0 ) { long n = sc . nextLong ( ) , a = sc . nextLong ( ) , b = sc . nextLong ( ) ; System . out . println ( Math . min ( b * ( n / 2 ) + a * ( n % 2 ) , a * n ) ) ; }   } }

import java . util . * ;   public class Test { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int t = input . nextInt ( ) ;   while ( t -- > 0 ) {   long n = input . nextLong ( ) ; int a = input . nextInt ( ) ; int b = input . nextInt ( ) ;   long result ; if ( ( n & 1 ) == 0 ) { result = Math . min ( ( n / 2 ) * b , n * a ) ; } else { result = Math . min ( ( n - 1 ) / 2 * b + a , n * a ) ; } System . out . println ( result ) ; } } }

import java . util . * ; public class waterbuying { public static void main ( String [ ] args ) { long q , n , a , b , cost ;   Scanner sc = new Scanner ( System . in ) ;   q = sc . nextLong ( ) ;   while ( q -- > 0 ) { n = sc . nextLong ( ) ; a = sc . nextLong ( ) ; b = sc . nextLong ( ) ;   cost = ( long ) ( Math . ceil ( n / 2 ) * Math . min ( 2 * a , b ) + ( n % 2 ) * a ) ;   System . out . println ( cost ) ; }   }   }

import sysimport re   def main ( ) : inp = sys . stdin . read ( ) . strip ( ) . split ( ' \n ' ) [ 1 : ] out = [ ] for s in inp : n , a , b = map ( int , s . split ( ) ) out . append ( min ( a * n , n // 2 * b + n % 2 * a ) ) return out   print ( * main ( ) , sep = ' \n ' ) NEW_LINE

t = int ( input ( ) ) while ( t ) :   n , a , b = map ( int , input ( ) . split ( ) ) al = 1 bl = 2 cost = 0 if ( ( a // al ) > ( b // bl ) ) : NEW_LINE

q = int ( input ( ) )   for i in range ( q ) : n , a , b = map ( int , input ( ) . split ( " ▁ " ) )   print ( min ( a * n , b * ( n // 2 ) + a * ( n % 2 ) ) ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int k = scan . nextInt ( ) ; int l = scan . nextInt ( ) ; int m = scan . nextInt ( ) ; int n = scan . nextInt ( ) ; int d = scan . nextInt ( ) ; int t = 0 ; for ( int i = 1 ; i <= d ; i ++ ) { if ( i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0 ) ; else t ++ ; } System . out . print ( ( d - t ) ) ; } }

import java . util . Scanner ;   public class Main {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ;   int k = in . nextInt ( ) ; int l = in . nextInt ( ) ; int m = in . nextInt ( ) ; int n = in . nextInt ( ) ; int d = in . nextInt ( ) ;   int a = 0 ; for ( int i = 1 ; i <= d ; i ++ ) { if ( i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0 ) a ++ ; }   System . out . println ( a ) ; } }

import java . util . Scanner ;   public class Insomnia_Cure {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int k = sc . nextInt ( ) ; int l = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int n = sc . nextInt ( ) ; int d = sc . nextInt ( ) ; int count = 0 ; boolean dragons [ ] = new boolean [ d + 1 ] ; for ( int i = 1 ; i < d + 1 ; i ++ ) { if ( i % k == 0 ) { dragons [ i ] = true ; } } for ( int i = 1 ; i < d + 1 ; i ++ ) { if ( i % l == 0 ) { dragons [ i ] = true ; } } for ( int i = 1 ; i < d + 1 ; i ++ ) { if ( i % m == 0 ) { dragons [ i ] = true ; } } for ( int i = 1 ; i < d + 1 ; i ++ ) { if ( i % n == 0 ) { dragons [ i ] = true ; } } for ( int i = 1 ; i < d + 1 ; i ++ ) { if ( dragons [ i ] == true ) { count ++ ; } } System . out . println ( count ) ; }   }

k = int ( input ( ) ) l = int ( input ( ) ) m = int ( input ( ) ) n = int ( input ( ) ) d = int ( input ( ) ) s = 0 for i in range ( 1 , d + 1 ) : if ( i % k != 0 and i % l != 0 and i % m != 0 and i % n != 0 ) : s += 1 print ( d - s ) NEW_LINE

k = int ( input ( ) ) l = int ( input ( ) ) m = int ( input ( ) ) n = int ( input ( ) ) d = int ( input ( ) ) arr = [ ] arr = [ i for i in range ( 1 , d + 1 ) ] if k == 1 or l == 1 or m == 1 or n == 1 : print ( d ) else : i = 0 while len ( arr ) > i : if arr [ i ] % k == 0 : arr . pop ( i ) else : i += 1 i = 0 while len ( arr ) > i : if arr [ i ] % l == 0 : arr . pop ( i ) else : i += 1 i = 0 while len ( arr ) > i : if arr [ i ] % m == 0 : arr . pop ( i ) else : i += 1 i = 0 while len ( arr ) > i : if arr [ i ] % n == 0 : arr . pop ( i ) else : i += 1 print ( d - len ( arr ) ) NEW_LINE

def Func ( N , D ) : i = 1 Lst = [ ] Val = N while N * i <= D : Lst . append ( N * i ) i = i + 1 return Lst K = int ( input ( ) ) L = int ( input ( ) ) M = int ( input ( ) ) N = int ( input ( ) ) D = int ( input ( ) )   ( Lst1 , Lst2 , Lst3 , Lst4 ) = ( Func ( K , D ) , Func ( L , D ) , Func ( M , D ) , Func ( N , D ) )   Set = set ( Lst1 + Lst2 + Lst3 + Lst4 ) if len ( Set ) <= D : print ( len ( Set ) ) else : print ( D )   NEW_LINE


import java . util . * ; public class MyClass { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; long s = n * ( n + 1 ) / 2 ; if ( s % 2 == 0 ) System . out . println ( 0 ) ; else System . out . println ( 1 ) ; } }

import java . util . Scanner ; public class Main { static Scanner in = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { int ans = 0 ; int n = in . nextInt ( ) ; if ( n % 2 == 0 ) { if ( ( n >> 1 ) % 2 == 1 ) ans = 1 ; else ans = 0 ; } else { if ( ( ( n - 1 ) >> 1 ) % 2 == 0 ) ans = 1 ; else ans = 0 ; } System . out . println ( ans ) ; } }

import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . util . Arrays ;    public class Solution {    public static void main ( String [ ] args ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;   String input = br . readLine ( ) ; long maximum = Integer . parseInt ( input ) ; long sum = maximum * ( maximum + 1 ) / 2 ; System . out . println ( sum % 2 ) ;    }    }

import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import static java . lang . Math . * ; import static java . lang . System . out ; import java . util . * ; import java . io . PrintStream ; import java . io . PrintWriter ; public class A { static final int N = ( int ) ( 1e5 + 100 ) ; static final int mod = 1000000007 ; static final long temp = 998244353 ; static final long MOD = 1000000007 ; static final long M = ( long ) 1e9 + 7 ; static class Pair implements Comparable < Pair > { int first , second ; public Pair ( int aa , int bb ) { first = aa ; second = bb ; } public int compareTo ( Pair o ) { if ( this . second < o . second ) return - 1 ; if ( this . second > o . second ) return + 1 ; return this . first - o . first ; } } static class Tuple implements Comparable < Tuple > { long first , second , third ; public Tuple ( long first , long second , long third ) { this . first = first ; this . second = second ; this . third = third ; } public int compareTo ( Tuple o ) { return ( int ) ( o . third - this . third ) ; } } public static class DSU { int [ ] parent ; int [ ] rank ;

n = int ( input ( ) ) a = n % 4 if ( a == 0 or a == 3 ) : print ( 0 ) else : print ( 1 ) NEW_LINE

n = int ( input ( ) ) if ( n * ( n + 1 ) ) % 4 == 0 : print ( 0 ) elif n <= 2 : print ( 1 ) elif n == 3 : print ( 0 ) else : print ( 1 )   NEW_LINE

def main ( ) : t = int ( input ( ) ) if ( t % 4 == 1 or t % 4 == 2 ) : print ( 1 ) else : print ( 0 ) main ( ) NEW_LINE

n = int ( input ( ) ) s = ( ( n + 1 ) // 2 ) print ( s % 2 ) NEW_LINE


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

import java . util . * ; import java . lang . * ; import java . io . * ;   public class FastIO { BufferedReader br ; StringTokenizer st ; public FastIO ( ) {

import java . util . * ;   public class Anton_and_currency_u_all_know { public static void swap ( char [ ] ar , int i , int j ) { char temp = ar [ j ] ; ar [ j ] = ar [ i ] ; ar [ i ] = temp ; System . out . println ( new String ( ar ) ) ; }   public static void main ( String arg [ ] ) { Scanner sc = new Scanner ( System . in ) ; char [ ] chArr = sc . nextLine ( ) . toCharArray ( ) ; int pos = - 1 ; boolean flag = false ; for ( int i = 0 ; i < chArr . length ; i ++ ) { if ( Character . getNumericValue ( chArr [ i ] ) % 2 == 0 ) { if ( Character . getNumericValue ( chArr [ i ] ) < Character . getNumericValue ( chArr [ chArr . length - 1 ] ) ) { swap ( chArr , i , chArr . length - 1 ) ; System . exit ( 0 ) ; } else { flag = true ; pos = i ; } } }    if ( flag == true ) swap ( chArr , pos , chArr . length - 1 ) ; else System . out . println ( - 1 ) ;   } }

a = list ( input ( ) ) flag = 1 k = 0 for i in range ( len ( a ) ) : if ( int ( a [ i ] ) % 2 == 0 and int ( a [ i ] ) < int ( a [ - 1 ] ) ) : k = i flag = 0 break elif ( int ( a [ i ] ) % 2 == 0 ) : k = i flag = 0 if ( flag ) : print ( - 1 ) else : temp = a [ k ] a [ k ] = a [ - 1 ] a [ - 1 ] = temp print ( " " . join ( a ) ) NEW_LINE

n = list ( input ( ) ) a , b = - 1 , - 1 for i , j in enumerate ( n ) : if int ( j ) > b and int ( j ) % 2 == 0 and int ( j ) < int ( n [ - 1 ] ) : b = int ( j ) a = i breakif a == - 1 and b == - 1 : a , b = - 1 , 2 ** 31 for i , j in enumerate ( n ) : if int ( j ) % 2 == 0 : b = int ( j ) a = iif a == - 1 : print ( - 1 ) else : n [ a ] , n [ - 1 ] = n [ - 1 ] , n [ a ] print ( " " . join ( n ) ) NEW_LINE

n = list ( input ( ) ) m = - 1 for i , d in enumerate ( n ) : if int ( d ) % 2 == 0 : m = i if int ( d ) < int ( n [ - 1 ] ) : breakif m < 0 : print ( - 1 ) else : n [ - 1 ] , n [ m ] = n [ m ] , n [ - 1 ] print ( ' ' . join ( n ) ) NEW_LINE

n = input ( ) res = - 1 i = 0 last = int ( n [ - 1 ] ) while i < len ( n ) : digit = int ( n [ i ] ) if digit % 2 == 0 : if digit > last : res = i if digit < last : res = i break i += 1   if res == - 1 : print ( res )   else : i = 0 while i < len ( n ) : if i == res : print ( last , end = " " ) elif i == len ( n ) - 1 : print ( n [ res ] , end = " " ) else : print ( n [ i ] , end = " " )   i += 1 print ( ) NEW_LINE

def n_to_list ( n ) : lst = [ ] while n > 0 : lst . append ( n % 10 ) n //= 10 lst . reverse ( ) return lst     def answer ( 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 + 2 ] ; while ( n -- > 0 ) { int l = sc . nextInt ( ) ; int r = sc . nextInt ( ) ; for ( int i = l ; i <= r ; i ++ ) a [ i ] = 1 ; } int cnt = 0 ; for ( int i = 1 ; i <= m ; i ++ ) if ( a [ i ] == 0 ) cnt ++ ; System . out . println ( cnt ) ; for ( int i = 1 ; i <= m ; i ++ ) if ( a [ i ] == 0 ) System . out . print ( i + " ▁ " ) ; } }

import java . util . * ; public class Main { public static void main ( String [ ] args ) { int n , m , count = 0 ; ; Scanner in = new Scanner ( System . in ) ; Set < Integer > set = new HashSet < Integer > ( ) ; n = in . nextInt ( ) ; m = in . nextInt ( ) ; int l [ ] = new int [ n ] ; int r [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { l [ i ] = in . nextInt ( ) ; r [ i ] = in . nextInt ( ) ; for ( int j = l [ i ] ; j <= r [ i ] ; j ++ ) { set . add ( j ) ; } } for ( int i = 1 ; i <= m ; i ++ ) { if ( ! set . contains ( i ) ) { count ++ ; } } System . out . println ( count ) ; for ( int i = 1 ; i <= m ; i ++ ) { if ( ! set . contains ( i ) ) { System . out . print ( i + " ▁ " ) ; } } } }

import java . util . * ; import java . io . * ; import java . math . BigInteger ; import java . text . * ; public class Main { static long mod = 1000_000_007 ; static long mod1 = 998244353 ; static boolean fileIO = false ; static boolean memory = true ; static FastScanner f ; static PrintWriter pw ; static double eps = ( double ) 1e-6 ; static int oo = ( int ) 1e9 ;   public static void solve ( ) throws Exception { int n = f . ni ( ) ; int m = f . ni ( ) ; int dp [ ] = new int [ 105 ] ;   for ( int i = 0 ; i < n ; ++ i ) { int l = f . ni ( ) ; int r = f . ni ( ) ; ++ dp [ l ] ; -- dp [ r + 1 ] ; } int cnt = 0 ;   for ( int i = 1 ; i < 105 ; ++ i ) dp [ i ] += dp [ i - 1 ] ; ArrayList < Integer > ans = new ArrayList < > ( ) ; for ( int i = 1 ; i <= m ; ++ i ) { if ( dp [ i ] == 0 ) { ++ cnt ; ans . add ( i ) ; } } pn ( cnt ) ; for ( Integer x : ans ) p ( x + " ▁ " ) ; } public static void main ( String [ ] args ) throws Exception { if ( memory ) new Thread ( null , new Runnable ( ) { public void run ( ) { try { new Main ( ) . run ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } } } , " " , 1 << 28 ) . start ( ) ; else new Main ( ) . run ( ) ; } void run ( ) throws Exception { if ( System . getProperty ( " ONLINE _ JUDGE " ) == null ) { f = new FastScanner ( " " ) ; pw = new PrintWriter ( System . out ) ; } else { f = new FastScanner ( ) ; pw = new PrintWriter ( System . out ) ;

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 Seg { public static void main ( String [ ] args ) throws Exception { Scanner sc = new Scanner ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int temp = 1 ; int [ ] a = sc . nextArr ( n * 2 ) ; int c = 0 ; int j = 0 ; int [ ] arr = new int [ 100 ] ; boolean flag = false ; while ( temp <= m ) { for ( int i = 0 ; i < a . length - 1 ; i = i + 2 ) { if ( temp >= a [ i ] && temp <= a [ i + 1 ] ) { c ++ ; flag = true ; break ; } else { flag = false ; }   } if ( ! flag ) { arr [ j ] = temp ; j ++ ; }   temp ++ ; }   System . out . println ( m - c ) ; for ( int i = 0 ; i < j ; i ++ ) { System . out . print ( arr [ i ] + " ▁ " ) ; }   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 ) ] ;

n , m = input ( ) . split ( ) n , m = int ( n ) , int ( m ) arr , brr = [ 0 ] * ( m + 2 ) , [ 0 ] * ( m + 2 ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) s = set ( range ( 1 , m + 1 ) ) for x in range ( n ) : l , r = map ( int , input ( ) . split ( ) ) for i in range ( l , r + 1 ) : s . discard ( i ) print ( len ( s ) ) print ( * s ) NEW_LINE

n , m = map ( int , input ( ) . split ( ) ) li = [ ] s = [ ] for i in range ( n ) : a , b = map ( int , input ( ) . split ( ) ) for i in range ( a - 1 , b ) : li . append ( ( i + 1 ) ) for i in range ( m ) : if i + 1 not in list ( set ( li ) ) : s . append ( i + 1 ) if len ( s ) > 0 : print ( len ( s ) ) print ( * s ) else : print ( 0 ) NEW_LINE

i = lambda : map ( int , input ( ) . split ( ) ) n , m = i ( ) s = lambda a , b : { * range ( a , b + 1 ) } v = s ( 1 , m ) for _ in range ( n ) : v -= s ( * i ( ) ) print ( len ( v ) ) print ( * v )   NEW_LINE