import sysfrom math import sqrt , log , log2 , ceil , log10 , gcd , floor , pow , sin , cos , tan , pi , inf , factorialfrom copy import copy , deepcopyfrom sys import exit , stdin , stdoutfrom collections import Counter , defaultdict , dequefrom itertools import permutationsimport heapqfrom bisect import bisect_left from bisect import bisect_right NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . * ;   public class Main {       public static void main ( String [ ] args ) throws IOException { FastScanner input = new FastScanner ( ) ;   String s = input . next ( ) ; int ans = 0 ; Stack < Character > st = new Stack < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( st . isEmpty ( ) ) st . add ( s . charAt ( i ) ) ; else { if ( st . peek ( ) == s . charAt ( i ) ) { st . add ( s . charAt ( i ) ) ; } else { ans ++ ; st . clear ( ) ; st . add ( s . charAt ( i ) ) ; } } if ( st . size ( ) == 5 ) { ans ++ ; st . clear ( ) ; } } if ( ! st . isEmpty ( ) ) ans ++ ; 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 ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; } }   }

def solve ( s ) : tot = 1 count = 1 i = 1 while i < len ( s ) : if s [ i ] == s [ i - 1 ] : if count == 5 : count = 1 tot += 1 else : count += 1 else : count = 1 tot += 1 i += 1 return tot                   def main ( ) : s = input ( ) NEW_LINE


import java . util . * ; public class Main { public static void main ( String args [ ] ) { Scanner in = new Scanner ( System . in ) ; String s = in . next ( ) ; char ch = s . charAt ( 0 ) ; int c = 1 ; int ans = 1 ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == ch ) { if ( c < 5 ) c ++ ; else { ans += 1 ; c = 1 ; } } else { ans += 1 ; c = 1 ; ch = s . charAt ( i ) ; }


import mathn = input ( ) def length ( s ) : res = [ ] counter = 1 for i in range ( 1 , len ( s ) ) : if s [ i - 1 ] == s [ i ] : counter += 1 else : res . append ( counter ) counter = 1 res . append ( counter ) return ressol = length ( n ) for i in range ( len ( sol ) ) : sol [ i ] = math . ceil ( sol [ i ] / 5 ) print ( sum ( sol ) )   NEW_LINE


st = input ( ) con = 1 ans = 1 pre = st [ 0 ] for i in range ( 1 , len ( st ) ) : if pre == st [ i ] and con < 5 : con += 1 else : con = 1 ans += 1 pre = st [ i ] print ( ans ) NEW_LINE


import java . util . Scanner ;   public class PostCardPhotos { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ;   String s = scan . nextLine ( ) ; int closet = 1 ; int count = 1 ; char prev = s . charAt ( 0 ) ;   for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( prev == s . charAt ( i ) ) { if ( count == 5 ) { count = 0 ; closet ++ ; } count ++ ; } else { count = 1 ; closet ++ ; if ( count == 5 ) { count = 0 ; } } prev = s . charAt ( i ) ; } System . out . println ( closet ) ; } }


import java . util . Scanner ;    public class PostcardsAndPhotos { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; String s = input . next ( ) ; int count = 1 ; char c = s . charAt ( 0 ) ; int temp = 1 ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) != c || temp == 5 ) { count ++ ; temp = 1 ; c = s . charAt ( i ) ; } else temp ++ ; } System . out . println ( count ) ; } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ;   public class ChatRecord { public static void main ( String [ ] args ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ;   int n = Integer . parseInt ( reader . readLine ( ) ) ;   for ( int i = 0 ; i < n ; i ++ ) { String chat = reader . readLine ( ) ;   if ( chat . startsWith ( " miao . " ) ) { if ( chat . endsWith ( " lala . " ) ) { System . out . println ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) ; } else System . out . println ( " Rainbow ' s " ) ; } else if ( chat . endsWith ( " lala . " ) ) { System . out . println ( " Freda ' s " ) ; } else System . out . println ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) ; } } }

try : n = int ( input ( ) ) for i in range ( n ) : s = input ( ) if ( s . endswith ( " lala . " ) and s . startswith ( " miao . " ) ) or ( not s . endswith ( " lala . " ) and not s . startswith ( " miao . " ) ) : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) elif s . startswith ( " miao . " ) : print ( " Rainbow ' s " ) else : print ( " Freda ' s " ) except : pass NEW_LINE


for _ in range ( int ( input ( ) ) ) : s = input ( ) if len ( s ) < 5 : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) elif ' lala ' not in s and ' miao . ' not in s : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) elif s [ : 5 ] == ' miao . ' and s [ - 5 : ] == ' lala . ' : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) elif s [ : 5 ] == ' miao . ' : print ( " Rainbow ' s " ) elif s [ - 5 : ] == ' lala . ' : print ( " Freda ' s " ) else : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) NEW_LINE


for x in range ( int ( input ( ) ) ) : a = input ( ) b = len ( a ) - 5 print if " lala . " in a [ b : ] and " miao . " in a [ : 5 ] : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) elif " miao . " in a [ : 5 ] : print ( " Rainbow ' s " ) elif " lala . " in a [ b : ] : print ( " Freda ' s " ) else : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) NEW_LINE


t = int ( input ( ) ) while t > 0 : t -= 1 s = input ( ) if len ( s ) >= 5 : if s [ : 5 ] == " miao . " and s [ : : - 1 ] [ : 5 ] != " . alal " : print ( " Rainbow ' s " ) elif s [ : 5 ] != " miao . " and s [ : : - 1 ] [ : 5 ] == " . alal " : print ( " Freda ' s " ) else : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) else : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) NEW_LINE


def solve ( ) : s = input ( ) if ( s [ - 5 : ] == ' lala . ' and s [ : 5 ] != " miao . " ) : print ( " Freda ' s " ) elif ( s [ - 5 : ] != ' lala . ' and s [ : 5 ] == " miao . " ) : print ( " Rainbow ' s " ) else : print ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " )     n = int ( input ( ) ) for _ in range ( n ) : solve ( ) NEW_LINE


import java . io . * ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) throws IOException { Scanner in = new Scanner ( System . in ) ; int n = Integer . parseInt ( in . nextLine ( ) ) ; for ( int i = 0 ; i < n ; i ++ ) { String s = in . nextLine ( ) ; boolean f = s . endsWith ( " lala . " ) ; boolean r = s . startsWith ( " miao . " ) ; if ( f && ! r ) System . out . println ( " Freda ' s " ) ; else if ( r && ! f ) System . out . println ( " Rainbow ' s " ) ; else System . out . println ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) ; } }   }


import java . util . Scanner ; public class B { public static Scanner scan = new Scanner ( System . in ) ; public static void solve ( ) { int n = scan . nextInt ( ) ; scan . nextLine ( ) ; while ( n -- > 0 ) { String s = scan . nextLine ( ) ; if ( s . startsWith ( " miao . " ) && ! s . endsWith ( " lala . " ) ) { System . out . println ( " Rainbow ' s " ) ; } else if ( ! s . startsWith ( " miao . " ) && s . endsWith ( " lala . " ) ) { System . out . println ( " Freda ' s " ) ; } else { System . out . println ( " OMG > . < ▁ I ▁ don ' t ▁ know ! " ) ; } } } public static void main ( String [ ] args ) { solve ( ) ; scan . close ( ) ; }   }


import java . io . * ; import java . util . * ;   import static java . lang . Integer . * ;   public class Main { public static void main ( String [ ] args ) throws IOException { FastReader in = new FastReader ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; HashMap < Integer , Integer > map = new HashMap < > ( ) ; int n = in . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int a = in . nextInt ( ) ; for ( int j = 2 ; j * j <= a ; j ++ ) { if ( a % j == 0 ) { int cnt = map . getOrDefault ( j , 0 ) ;

res , N = 1 , int ( 1e5 + 16 ) n = int ( input ( ) ) M = { } for i in map ( int , input ( ) . split ( ) ) : M [ i ] = M . get ( i , 0 ) + 1 for i in range ( 2 , N ) : num = 0 for k in range ( i , N , i ) : num += M . get ( k , 0 ) res = max ( res , num ) print ( res ) NEW_LINE


n = int ( input ( ) ) ip = list ( map ( int , input ( ) . split ( ) ) ) m = max ( ip ) ; ans = 0 x = [ 0 ] * ( m + 1 ) ; p = [ ] p . append ( 1 ) for i in ip : x [ i ] += 1 for k in range ( 2 , m + 1 , 1 ) : l = k z = 0 while l <= m : z += x [ l ] l += k if ans < z : p . append ( z ) print ( max ( p ) ) NEW_LINE


from collections import defaultdictn = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) factors = defaultdict ( int ) for i in range ( n ) : root = int ( a [ i ] ** 0.5 ) for j in range ( 2 , root + 1 ) : if a [ i ] % j == 0 : factors [ j ] += 1 while a [ i ] % j == 0 : a [ i ] //= j if a [ i ] > 1 : factors [ a [ i ] ] += 1 ans = 1 for i in factors : ans = max ( ans , factors [ i ] ) print ( ans ) NEW_LINE


val = int ( '1' + '0' * 5 ) freequency = [ 0 ] * ( val + 1 ) n = int ( input ( ) ) l = list ( map ( int , input ( ) . split ( ) ) ) for x in range ( n ) : freequency [ l [ x ] ] += 1 ans = 1 for x in range ( 2 , val + 1 ) : count = 0 for y in range ( x , val + 1 , x ) : count += freequency [ y ] ans = max ( ans , count ) print ( ans ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ; import static java . util . Arrays . sort ; import javafx . util . Pair ;   public class Main {   public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; int count [ ] = new int [ 100001 ] ; for ( int i = 0 ; i < n ; i ++ ) { int value = input . nextInt ( ) ; count [ value ] ++ ; } int max = 1 ; for ( int i = 2 ; i < 100001 ; i ++ ) { int c = 0 ; for ( int j = i ; j <= 100000 ; j += i ) { c += count [ j ] ; } max = Math . max ( max , c ) ; } System . out . println ( max ) ;   }   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 ( ) ) ; }   long nextLong ( ) {   return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) throws IOException { return br . readLine ( ) ; } }   }


import java . io . PrintWriter ; import java . util . Arrays ; import java . util . Scanner ;   public class Main { static boolean [ ] prime ; public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; PrintWriter p = new PrintWriter ( System . out ) ; int n = in . nextInt ( ) ; int [ ] ara = new int [ 100001 ] ; Arrays . fill ( ara , 0 ) ; int ans = 1 ; for ( int i = 0 ; i < n ; i ++ ) { ara [ in . nextInt ( ) ] ++ ; }   for ( int i = 2 ; i < ara . length ; i ++ ) { for ( int j = i * 2 ; j < ara . length ; j += i ) { ara [ i ] += ara [ j ] ; } ans = Math . max ( ans , ara [ i ] ) ; }   p . println ( ans ) ; p . close ( ) ; }   }


import java . util . * ; public class DreamoonAndStairs { public static int minStair ( int n , int m ) { if ( n < m ) { return - 1 ; } int minSteps = n / 2 + n % 2 ; int nextMultiple = m ; int i = 2 ; while ( true ) { if ( minSteps > nextMultiple ) { nextMultiple = m * i ; } else { break ; } i ++ ; } return nextMultiple ; } public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; int n = in . nextInt ( ) ; int m = in . nextInt ( ) ; System . out . println ( minStair ( n , m ) ) ; in . close ( ) ;   }   }

n , m = map ( int , input ( ) . split ( ) ) count = 0 if ( n < m ) : print ( " - 1" ) else : if ( n % 2 == 0 ) : count = n // 2 else : count = n // 2 + 1 while ( count % m != 0 ) : count += 1 print ( count ) NEW_LINE


import mathdef solve ( n , m ) : start = n % 2 + n // 2 while start <= n : if start % m == 0 : return start start += 1 return - 1                   def main ( ) : NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) t = ( n // 2 ) + ( n % 2 ) print ( - 1 ) if n < m else print ( t + ( ( m - ( t % m ) ) % m ) ) NEW_LINE


import sys   n , m = map ( int , sys . stdin . readline ( ) . split ( ) )   num_twos = n // 2 ; num_steps = num_twos + n % 2   num_changed = 0   while ( num_steps % m != 0 ) and ( num_twos > 0 ) and ( num_changed < 30 ) : num_twos -= 1 num_steps += 1 num_changed += 1   if num_steps % m != 0 : print ( - 1 ) else : print ( num_steps ) NEW_LINE


import sysfrom functools import lru_cache , cmp_to_keyfrom heapq import merge , heapify , heappop , heappushfrom math import * from collections import defaultdict as dd , deque , Counter as Cfrom itertools import combinations as comb , permutations as permfrom bisect import bisect_left as bl , bisect_right as br , bisect , insortfrom time import perf_counterfrom fractions import Fractionimport copyfrom copy import deepcopyimport timestarttime = time . time ( ) mod = int ( pow ( 10 , 9 ) + 7 ) mod2 = 998244353   def data ( ) : return sys . stdin . readline ( ) . strip ( ) def out ( * var , end = " \n " ) : sys . stdout . write ( ' ▁ ' . join ( map ( str , var ) ) + end ) def L ( ) : return list ( sp ( ) ) def sl ( ) : return list ( ssp ( ) ) def sp ( ) : return map ( int , data ( ) . split ( ) ) def ssp ( ) : return map ( str , data ( ) . split ( ) ) def l1d ( n , val = 0 ) : return [ val for i in range ( n ) ] def l2d ( n , m , val = 0 ) : return [ l1d ( n , val ) for j in range ( m ) ] try : NEW_LINE


import java . util . Scanner ; public class cond {     public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; int n = s . nextInt ( ) ; int m = s . nextInt ( ) ; if ( m > n ) { System . out . println ( - 1 ) ; return ; } else if ( n % 2 == 0 ) { int k = n / 2 ; while ( k <= n ) { if ( k % m == 0 ) { System . out . println ( k ) ; return ; } k ++ ; } } else { int k = ( n / 2 ) + 1 ; while ( k <= n ) { if ( k % m == 0 ) { System . out . println ( k ) ; return ; } k ++ ; } } } }


import java . util . Scanner ;   public class _0604DreamoonandStairs {   static int DreamoonandStairs ( int n , int m ) { int val = n / 2 ; if ( n % 2 != 0 ) { val ++ ; } if ( val % m != 0 ) { val += m - ( val % m ) ; } return val ; } public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; if ( n < m ) { System . out . println ( - 1 ) ; } else { System . out . println ( DreamoonandStairs ( n , m ) ) ; } }   }


a , b = map ( int , raw_input ( ) . split ( ) ) print ( ( pow ( 3 , a , b ) + b - 1 ) % b )

n = input ( ) . split ( ) n1 = int ( n [ 0 ] ) n2 = int ( n [ 1 ] ) F = pow ( 3 , n1 , n2 ) print ( ( F - 1 ) % n2 )     NEW_LINE


# include < iostream >   using namespace std ;   int n , m ;   int putere ( int x , int p ) ;   int main ( ) { int i ;   cin >> n >> m ; int rez = putere ( 3 , n ) ; rez -- ; if ( rez < 0 ) rez += m ; cout << rez << ' \n ' ; return 0 ; }   int putere ( int x , int p ) { int aux = 1 ;   while ( p ) { if ( p % 2 ) aux = ( 1l l * aux * x ) % m ; x = ( 1l l * x * x ) % m ; p /= 2 ; } return aux ; }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStream ; import java . io . InputStreamReader ; import java . io . OutputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ;   public class FlyingSaucerSegments {   public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; InputReader in = new InputReader ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; long n = in . nextLong ( ) ; long mod = in . nextLong ( ) ; long ans = fastPow ( 3 , n , mod ) - 1 ; if ( ans == - 1 ) ans += mod ; out . println ( ans ) ; out . close ( ) ; }   static long fastPow ( long a , long b , long mod ) { if ( b == 0 ) return 1L ; long val = fastPow ( a , b / 2 , mod ) ; if ( b % 2 == 0 ) return val * val % mod ; else return val * val % mod * a % mod ; } static class InputReader { public BufferedReader reader ; public StringTokenizer tokenizer ;   public InputReader ( InputStream stream ) { reader = new BufferedReader ( new InputStreamReader ( stream ) , 32768 ) ; tokenizer = null ; }   public String next ( ) { while ( tokenizer == null || ! tokenizer . hasMoreTokens ( ) ) { try { tokenizer = new StringTokenizer ( reader . readLine ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return tokenizer . nextToken ( ) ; }   public int nextInt ( ) { return Integer . parseInt ( next ( ) ) ; }   public long nextLong ( ) { return Long . parseLong ( next ( ) ) ; } }    }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . ArrayDeque ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashSet ; import java . util . Random ; import java . util . StringTokenizer ; import java . util . TreeMap ;   public class Solution { static ArrayList < Integer > [ ] adjlist ; static int n ; static final int inf = ( int ) 1e9 ; static int ans = inf ; static int [ ] q ; public static void main ( String [ ] args ) throws IOException { FastScanner fs = new FastScanner ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int tt = 1 ; while ( tt -- > 0 ) { n = fs . nextInt ( ) ; long [ ] a = new long [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = fs . nextLong ( ) ;

import sysinput = sys . stdin . readlinefrom collections import deque   class Graph ( object ) : """ docstring ▁ for ▁ Graph """ def __init__ ( self , n , d ) : NEW_LINE


from sys import stdinfrom collections import deque     INT_MAX = float ( ' inf ' ) def shortest_cycle ( gr ) : NEW_LINE


def solve ( n , a ) : B = 60 bits = [ [ ] for i in range ( B ) ] for i in range ( n ) : for j in range ( B ) : if a [ i ] & ( 1 << j ) : bits [ j ] . append ( i )   adj = [ [ ] for i in range ( n ) ] for shared in bits : if len ( shared ) >= 3 : return 3 elif len ( shared ) == 2 : u , v = shared adj [ u ] . append ( v ) adj [ v ] . append ( u )   vis = [ False for u in range ( n ) ] dist = [ - 1 for u in range ( n ) ] def shortest_cycle ( n , adj , s ) : frontier = [ ( s , - 1 ) ] dist [ s ] = 0 ptr = 0   while ptr < len ( frontier ) : u , p = frontier [ ptr ] if not vis [ u ] : vis [ u ] = True for v in adj [ u ] : if vis [ v ] and v != p : ans = dist [ u ] + dist [ v ] + 1 for u , p in frontier : vis [ u ] = False dist [ u ] = - 1 return ans if dist [ v ] == - 1 : dist [ v ] = dist [ u ] + 1 frontier . append ( ( v , u ) ) ptr += 1   return 10 ** 18 NEW_LINE


import sysreadline = sys . stdin . readlinefrom collections import deque   N = int ( readline ( ) ) A = list ( map ( int , readline ( ) . split ( ) ) ) A = [ a for a in A if a ] limit = 32 table = [ 0 ] * limit   for a in A : for i in range ( limit ) : if a & ( 1 << i ) : table [ i ] += 1   if max ( table ) > 2 : print ( 3 )   else : INF = 10 ** 18 + 3 N = len ( A ) Edge = [ set ( ) for _ in range ( N ) ] for i in range ( N ) : for j in range ( i ) : if A [ i ] & A [ j ] : Edge [ i ] . add ( j ) Edge [ j ] . add ( i ) ans = INF for st in range ( N ) : for en in Edge [ st ] . copy ( ) : Edge [ st ] . remove ( en ) Edge [ en ] . remove ( st ) dist = [ INF ] * N dist [ st ] = 0 Q = deque ( [ st ] ) while Q : vn = Q . pop ( ) for vf in Edge [ vn ] : if dist [ vf ] == INF : dist [ vf ] = 1 + dist [ vn ] Q . appendleft ( vf ) ans = min ( ans , 1 + dist [ en ] ) Edge [ st ] . add ( en ) Edge [ en ] . add ( st ) if ans >= INF : ans = - 1 print ( ans ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . * ;   public class Codeforces {   private static final Scanner sc = new Scanner ( System . in ) ; private static final BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; private static final long MOD = ( long ) ( 1e9 + 7 ) ;   public static int [ ] LPS ( String p ) { int [ ] lps = new int [ p . length ( ) ] ;   int i = 1 ; int j = 0 ; while ( i < p . length ( ) ) { if ( p . charAt ( i ) == p . charAt ( j ) ) { lps [ i ] = j + 1 ; i ++ ; j ++ ; } else { if ( j == 0 ) { lps [ i ] = 0 ; i ++ ; } else { j = lps [ j - 1 ] ; } } } return lps ; }   public static void KMP ( String text , String pattern ) { int [ ] lps = LPS ( pattern ) ; int i = 0 ; int j = 0 ; ArrayList < Integer > matches = new ArrayList < > ( ) ; while ( i < text . length ( ) ) { if ( text . charAt ( i ) == pattern . charAt ( j ) ) { i ++ ; j ++ ; } else { if ( j != 0 ) { j = lps [ j - 1 ] ; } else { i ++ ; } } if ( j == pattern . length ( ) ) { matches . add ( i - j ) ; j = lps [ j - 1 ] ; } } for ( int x : matches ) { System . out . println ( " Match ▁ at ▁ : ▁ " + x ) ; } }   private static class SegmentTree { private long [ ] st ; private int size ; private int n ; private long [ ] a ; SegmentTree ( long [ ] a , int n ) { this . size = 4 * n ; this . n = n ; this . a = a ; st = new long [ size ] ;

n , k = [ x for x in input ( ) . split ( ) ] cnt = 0 k = int ( k ) l = len ( n ) for i in range ( l - 1 , - 1 , - 1 ) : if k <= 0 : break elif n [ i ] == '0' : k -= 1 else : cnt += 1 if k <= 0 : print ( cnt ) else : print ( l - 1 ) NEW_LINE


import sysimport mathfrom collections import OrderedDictdef input ( ) : return sys . stdin . readline ( ) . strip ( ) def iinput ( ) : return int ( input ( ) ) def minput ( ) : return map ( int , input ( ) . split ( ) ) def listinput ( ) : return list ( map ( int , input ( ) . split ( ) ) ) n , k = map ( str , input ( ) . split ( ) ) if n == '0' : print ( '0' ) elif n . count ( '0' ) < int ( k ) : print ( len ( n ) - 1 ) else : for i in range ( 1 , len ( n ) ) : if n [ i ] == '0' and n [ i : ] . count ( '0' ) == int ( k ) : print ( len ( n [ i : ] ) - int ( k ) ) break NEW_LINE


n , k = map ( int , input ( ) . split ( ) ) n = str ( n ) if ( len ( n ) <= k ) : print ( len ( n ) - 1 ) else : n = str ( n ) count = 0 ans = 0 for i in range ( len ( n ) - 1 , - 1 , - 1 ) : if ( n [ i ] == "0" ) : count = count + 1 if ( count == k ) : break else : ans = ans + 1 if ( count != k ) : print ( len ( n ) - 1 ) else : print ( ans ) NEW_LINE


""" ▁ Created ▁ by ▁ Henrikh ▁ Kantuni ▁ on ▁ 2/26/17 ▁ """   n , k = [ int ( x ) for x in input ( ) . split ( ) ] digits = list ( str ( n ) )   zero_count = digits . count ( '0' ) if zero_count < k : print ( len ( str ( n ) ) - 1 ) exit ( )   count = 0 i = len ( digits ) - 1   while int ( ' ' . join ( digits ) ) % 10 ** k > 0 : if digits [ i ] != '0' : del digits [ i ] count += 1 i -= 1   print ( count ) NEW_LINE


import java . util . * ; import java . lang . * ; import java . io . * ; import java . math . * ;    public class file {


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ;   public class Main {   public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ;   String s = input . next ( ) ; int k = input . nextInt ( ) ; int count = 0 ; for ( int i = s . length ( ) - 1 ; i >= 0 ; i -- ) { if ( s . charAt ( i ) == '0' ) { count ++ ; } if ( count == k ) { System . out . println ( ( s . length ( ) - ( i ) ) - count ) ; return ; } } if ( count < k ) { System . out . println ( s . length ( ) - 1 ) ; }   }   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 ( ) ) ; }   long nextLong ( ) {   return Long . parseLong ( next ( ) ) ; }   double nextDouble ( ) { return Double . parseDouble ( next ( ) ) ; }   String nextLine ( ) throws IOException { return br . readLine ( ) ; } }   }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . math . BigInteger ; import java . util . * ;   import javafx . util . Pair ;   public class Main { static long count = 0 ; public static void main ( String [ ] args ) {   FastScanner input = new FastScanner ( ) ; int n = input . nextInt ( ) ; int m = input . nextInt ( ) ; ArrayList < ArrayList < Integer > > a = new ArrayList < > ( n + 1 ) ; boolean visited [ ] = new boolean [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { a . add ( new ArrayList < > ( ) ) ; } for ( int i = 0 ; i < m ; i ++ ) { int x = input . nextInt ( ) ; int y = input . nextInt ( ) ; a . get ( x ) . add ( y ) ; a . get ( y ) . add ( x ) ; } long ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( ! visited [ i ] ) { count = 0 ; dfs ( visited , a , i ) ; ans += ( count - 1 ) ; } }

import bisectimport collectionsimport copyimport functoolsimport heapqimport itertoolsimport mathimport randomimport reimport sysimport timeimport stringfrom typing import List NEW_LINE


from collections import defaultdictdef dfs ( node , graph , vis ) : global count vis [ node ] = True count += 1 for i in graph [ node ] : if not vis [ i ] : dfs ( i , graph , vis ) n , m = map ( int , input ( ) . split ( ) ) if m == 0 : print ( 1 ) else : graph = defaultdict ( list ) for i in range ( m ) : a , b = map ( int , input ( ) . split ( ) ) graph [ a ] . append ( b ) graph [ b ] . append ( a ) vis = [ False ] * ( n + 1 ) ans = 0 ans = 0 for i in range ( 1 , n + 1 ) : global count count = 0 if not vis [ i ] : dfs ( i , graph , vis ) ans += 1 print ( pow ( 2 , n - ans ) ) NEW_LINE


n , m = map ( int , input ( ) . split ( ) ) arr = [ x for x in range ( 0 , n + 1 ) ] d = 1 for i in range ( m ) : a , b = map ( int , input ( ) . split ( ) ) a , b = arr [ a ] , arr [ b ] while a != arr [ a ] : a = arr [ a ] while b != arr [ b ] : b = arr [ b ] if a != b : arr [ b ] = a d *= 2 print ( d ) NEW_LINE


def gf ( x ) : if fa [ x ] != x : fa [ x ] = gf ( fa [ x ] ) return fa [ x ]     n , m = map ( int , input ( ) . split ( ) ) fa = list ( range ( n + 1 ) ) for _ in range ( m ) : x , y = map ( int , input ( ) . split ( ) ) fa [ gf ( x ) ] = gf ( y ) ans = 2 ** nfor i in range ( 1 , n + 1 ) : if gf ( i ) == i : ans //= 2 print ( ans ) NEW_LINE


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


import java . util . * ; import java . util . zip . CRC32 ;   public class Solution {   static Scanner scan = new Scanner ( System . in ) ;   static class DSU { int parent [ ] ; int groupSize [ ] ; public DSU ( int nodes ) { parent = new int [ nodes + 1 ] ; groupSize = new int [ nodes + 1 ] ; for ( int i = 0 ; i <= nodes ; i ++ ) { parent [ i ] = i ; groupSize [ i ] = 1 ; } }   public int findSuperParent ( int node ) { if ( parent [ node ] == node ) return node ; return parent [ node ] = findSuperParent ( parent [ node ] ) ; } public void mergeGroup ( int x , int y ) { int xSuperParent = findSuperParent ( x ) ; int ySuperParent = findSuperParent ( y ) ; if ( xSuperParent == ySuperParent ) return ; if ( groupSize [ xSuperParent ] > groupSize [ ySuperParent ] ) { parent [ ySuperParent ] = xSuperParent ; groupSize [ xSuperParent ] += groupSize [ ySuperParent ] ; } else { parent [ xSuperParent ] = ySuperParent ; groupSize [ ySuperParent ] += groupSize [ xSuperParent ] ; } }    public int getExpectedFriends ( int element ) { return groupSize [ findSuperParent ( element ) ] - 1 ; } }   public static void main ( String [ ] args ) {


import java . io . * ; import java . util . * ; 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 ; } } static FastReader sc = new FastReader ( ) ; static List < pair > g [ ] ; public static void main ( String [ ] args ) throws Exception { PrintWriter out = new PrintWriter ( System . out ) ; int k = 1 ;


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; import java . io . IOException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ;   public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; ABeautifulMatrix solver = new ABeautifulMatrix ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; }   static class ABeautifulMatrix { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { int r = - 1 , c = - 1 ; int [ ] [ ] a = new int [ 5 ] [ 5 ] ; for ( int i = 0 ; i < 5 ; i ++ ) { for ( int j = 0 ; j < 5 ; j ++ ) { a [ i ] [ j ] = in . nextInt ( ) ; if ( a [ i ] [ j ] == 1 ) { r = i ; c = j ; } } } int ans = Math . abs ( r - 2 ) + Math . abs ( c - 2 ) ; out . println ( ans ) ; }   }   static class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( InputStream inputStream ) { br = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; }   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 ( ) ) ; }   } }

matrix = [ ] for i in range ( 5 ) : row = list ( map ( int , input ( ) . split ( ) ) ) matrix . append ( row ) r = 0 c = 0 for i in range ( 5 ) : for j in range ( 5 ) : if matrix [ i ] [ j ] == 1 : if ( i != 2 ) : r = abs ( 2 - i ) if ( j != 2 ) : c = abs ( 2 - j )                                   print ( r + c ) NEW_LINE


for row in range ( 0 , 5 ) : row_matrix = [ int ( n ) for n in input ( ) . split ( ) ] if 1 in row_matrix : column_index = row_matrix . index ( 1 ) print ( abs ( column_index - 2 ) + abs ( row - 2 ) ) NEW_LINE


lst = [ ]   x = y = 0   for i in range ( 5 ) :   matrix = input ( ) . split ( )   lst . append ( matrix )   for j in range ( 0 , 5 ) :   if ( lst [ i ] [ j ] == "1" ) :   x = i - 2   y = j - 2   print ( abs ( x ) + abs ( y ) ) NEW_LINE


lst = [ ] x = y = 0 for i in range ( 5 ) : matrix = input ( ) . split ( ) lst . append ( matrix ) for j in range ( 0 , 5 ) : if ( lst [ i ] [ j ] == "1" ) : x = i - 2 y = j - 2 print ( abs ( x ) + abs ( y ) ) NEW_LINE


data = [ ] for i in range ( 5 ) : data . append ( list ( map ( int , input ( ) . split ( ) ) ) )   n , m = 0 , 0 for i in range ( 5 ) : for j in range ( 5 ) : if data [ i ] [ j ] == 1 : n , m = i , j   print ( abs ( 3 - ( n + 1 ) ) + abs ( 3 - ( m + 1 ) ) ) NEW_LINE


import java . io . * ;   import java . lang . * ;    import java . util . * ;   public class TestA { 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 ) {   try { System . setIn ( new FileInputStream ( " input . txt " ) ) ; System . setOut ( new PrintStream ( new FileOutputStream ( " output . txt " ) ) ) ; } catch ( Exception e ) { System . err . println ( " Error " ) ; }   FastReader objScanner = new FastReader ( ) ;  		  int arr [ ] [ ] = new int [ 6 ] [ 6 ] ;   int x = - 1 ; int y = - 1 ; for ( int i = 1 ; i <= 5 ; i ++ ) { for ( int j = 1 ; j <= 5 ; j ++ ) { arr [ i ] [ j ] = objScanner . nextInt ( ) ;   if ( arr [ i ] [ j ] == 1 ) { x = i ; y = j ; } } }   System . out . println ( Math . abs ( x - 3 ) + Math . abs ( y - 3 ) ) ; }   }


import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner scan = new Scanner ( System . in ) ; int a = 0 , b = 0 ; for ( int i = 0 ; i < 25 ; i ++ ) { if ( scan . nextInt ( ) == 1 ) { a = i % 5 ; b = i / 5 ; } } System . out . println ( Math . abs ( a - 2 ) + Math . abs ( b - 2 ) ) ; } }


import java . io . * ; import java . util . * ; import java . lang . * ; import java . util . Random ; public class Main { public static void main ( String [ ] args ) throws java . lang . Exception { Scanner scan = new Scanner ( System . in ) ; int repeat = 1 ; while ( repeat -- > 0 ) { int [ ] [ ] matrix = new int [ 5 ] [ 5 ] ; int count = 0 ; int row = 0 ; int col = 0 ; while ( count < 25 ) { int val = scan . nextInt ( ) ; if ( val == 1 ) { row = count / 5 ; col = count % 5 ; break ; } count ++ ; } int dist = Math . abs ( row - 2 ) + Math . abs ( col - 2 ) ; System . out . println ( dist ) ; } } }


import java . util . Scanner ;   public class BeautifulMatrix {   public static void main ( String [ ] args ) { matrix ( ) ;   } public static void matrix ( ) { Scanner s = new Scanner ( System . in ) ; int x = 0 , y = 0 ; int [ ] [ ] feld = new int [ 5 ] [ 5 ] ; for ( int i = 0 ; i < 5 ; i ++ ) { for ( int j = 0 ; j < 5 ; j ++ ) { feld [ i ] [ j ] = s . nextInt ( ) ; if ( feld [ i ] [ j ] == 1 ) { x = i ; y = j ; } } } int hor = x - 2 < 0 ? ( x - 2 ) * ( - 1 ) : x - 2 ; int vert = y - 2 < 0 ? ( y - 2 ) * ( - 1 ) : y - 2 ; System . out . print ( hor + vert ) ; }   }


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 = true ; static boolean memory = true ; static FastScanner f ; static PrintWriter pw ; static double eps = ( double ) 1e-6 ; static int oo = ( int ) 2e9 ;

n = int ( input ( ) ) if n < 4 : print ( " NO " ) else : print ( " YES " ) if n == 4 : print ( "4 ▁ * ▁ 3 ▁ = ▁ 12 \n 12 ▁ * ▁ 2 ▁ = ▁ 24 \n 24 ▁ * ▁ 1 ▁ = 24" ) elif n == 5 : print ( "5 ▁ * ▁ 4 ▁ = ▁ 20 \n 20 ▁ + ▁ 3 ▁ = ▁ 23 \n 23 ▁ + ▁ 2 ▁ = ▁ 25 \n 25 ▁ - ▁ 1 ▁ = ▁ 24" ) else : print ( "4 ▁ * ▁ 3 ▁ = ▁ 12 \n 12 ▁ * ▁ 2 ▁ = ▁ 24 \n " + str ( n ) + " ▁ - ▁ " + str ( n - 1 ) + " ▁ = ▁ 1 \n 1 ▁ - ▁ 1 ▁ = ▁ 0" ) for i in range ( 5 , n - 1 ) : print ( str ( i ) + " ▁ * ▁ 0 ▁ = ▁ 0" ) print ( "24 ▁ + ▁ 0 ▁ = ▁ 24" ) NEW_LINE


n = int ( input ( ) ) if n > 3 : print ( " YES " ) if n % 2 : for i in range ( 6 , n , 2 ) : print ( i + 1 , " ▁ - ▁ " , i , " ▁ = ▁ " , 1 ) print ( "5 ▁ - ▁ 1 ▁ = ▁ 4 \n 4 ▁ - ▁ 2 ▁ = ▁ 2" ) print ( "4 ▁ * ▁ 3 ▁ = ▁ 12 \n 12 ▁ * ▁ 2 ▁ = ▁ 24" ) else : print ( "4 ▁ * ▁ 3 ▁ = ▁ 12 \n 12 ▁ * ▁ 2 ▁ = ▁ 24" ) for i in range ( 5 , n , 2 ) : print ( i + 1 , " ▁ - ▁ " , i , " ▁ = ▁ " , 1 ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) for i in range ( ( n - 4 ) // 2 ) : print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) else : print ( " NO " ) NEW_LINE


n = int ( input ( ) ) if ( n <= 3 ) : print ( " NO " ) else : print ( " YES " ) if ( n % 2 == 0 ) : print ( "1 ▁ * ▁ 2 ▁ = ▁ 2" ) print ( "2 ▁ * ▁ 3 ▁ = ▁ 6" ) print ( "6 ▁ * ▁ 4 ▁ = ▁ 24" ) for i in range ( 5 , n , 2 ) : print ( str ( i + 1 ) + " ▁ - ▁ " + str ( i ) + " ▁ = ▁ 1" ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) else : print ( "5 ▁ + ▁ 1 ▁ = ▁ 6" ) print ( "6 ▁ * ▁ 4 ▁ = ▁ 24" ) print ( "3 ▁ - ▁ 2 ▁ = ▁ 1" ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) for i in range ( 6 , n , 2 ) : print ( str ( i + 1 ) + " ▁ - ▁ " + str ( i ) + " ▁ = ▁ 1" ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) NEW_LINE


n = int ( input ( ) ) if n < 4 : print ( " NO " ) elif n % 2 == 0 : print ( " YES " ) print ( "1 ▁ * ▁ 2 ▁ = ▁ 2" ) print ( "2 ▁ * ▁ 3 ▁ = ▁ 6" ) print ( "6 ▁ * ▁ 4 ▁ = ▁ 24" ) for i in range ( 5 , n + 1 , 2 ) : print ( i + 1 , " - " , i , " = " , 1 ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) else : print ( " YES " ) print ( "5 ▁ + ▁ 4 ▁ = ▁ 9" ) print ( "9 ▁ + ▁ 3 ▁ = ▁ 12" ) print ( "12 ▁ * ▁ 2 ▁ = ▁ 24" ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) for i in range ( 6 , n + 1 , 2 ) : print ( i + 1 , " - " , i , " = " , 1 ) print ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) NEW_LINE


import java . util . * ; import java . io . * ;   public class Test { public static void main ( String [ ] args ) throws IOException { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; PriorityQueue < Integer > pq = new PriorityQueue < > ( Collections . reverseOrder ( ) ) ; if ( n <= 3 ) System . out . println ( " NO " ) ; else { System . out . println ( " YES " ) ; for ( int i = 1 ; i < n + 1 ; i ++ ) { pq . add ( i ) ; } int ct = 0 ; while ( ! pq . isEmpty ( ) ) { int a = pq . poll ( ) ; int b = pq . poll ( ) ; if ( a == 4 ) { System . out . println ( "4 ▁ * ▁ 3 ▁ = ▁ 12" ) ; System . out . println ( "12 ▁ * ▁ 2 ▁ = ▁ 24" ) ; System . out . println ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) ; break ; } if ( a == 5 ) { System . out . println ( "5 ▁ - ▁ 3 ▁ = ▁ 2" ) ; System . out . println ( "2 ▁ + ▁ 1 ▁ = ▁ 3" ) ; System . out . println ( "4 ▁ * ▁ 3 ▁ = ▁ 12" ) ; System . out . println ( "12 ▁ * ▁ 2 ▁ = ▁ 24" ) ; break ; } System . out . println ( a + " ▁ - ▁ " + b + " ▁ = ▁ 1" ) ; ct ++ ; } while ( ct -- > 0 ) { System . out . println ( "24 ▁ * ▁ 1 ▁ = ▁ 24" ) ; } } } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . util . Scanner ;   public class Codeforces {   private static final Scanner sc = new Scanner ( System . in ) ; private static final BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; private static final long MOD = ( long ) ( 1e9 + 7 ) ; private static PrintWriter out = new PrintWriter ( System . out ) ;   public static void solve ( int T ) throws IOException { int n = sc . nextInt ( ) ; if ( n == 1 ) { System . out . println ( " O " ) ; return ; } if ( n == 2 ) { System . out . println ( " OO " ) ; return ; } int [ ] f = new int [ n + 5 ] ; int a = 0 ; int b = 1 ; f [ 0 ] = a ; f [ 1 ] = b ; for ( int i = 2 ; i <= n + 4 ; i ++ ) { int c = a + b ; f [ i ] = c ; a = b ; b = c ; }

a , b = 1 , 1 k = int ( input ( ) ) n = 1 while n <= k : if n == b : print ( " O " , end = " " ) a , b = b , a + b else : print ( " o " , end = " " ) n = n + 1 NEW_LINE


import math   def isPerfectSquare ( x ) : s = int ( math . sqrt ( x ) ) return s * s == x   def isFibonacci ( n ) : return isPerfectSquare ( 5 * n * n + 4 ) or isPerfectSquare ( 5 * n * n - 4 )   n = int ( input ( ) ) for i in range ( 1 , n + 1 ) : if isFibonacci ( i ) : print ( " O " , end = " " ) else : print ( " o " , end = " " ) NEW_LINE


class eleven : def __init__ ( self , n ) : self . n = n self . printName ( self . n ) def printName ( self , n ) : list1 = [ 0 , 1 ] f0 = 0 f1 = 1 for x in range ( 0 , n ) : f2 = f0 + f1 list1 . append ( f2 ) f0 = f1 f1 = f2 for x in range ( 1 , n + 1 ) : if x in list1 : print ( ' O ' , end = " " ) else : print ( " o " , end = " " ) n = int ( input ( ) ) if ( 1 <= n and n <= 1000 ) : passelse : exit ( ) elevenObj = eleven ( n ) NEW_LINE


n = int ( input ( ) ) s = [ ' o ' ] * na = b = c = 1 while a <= n : s [ a - 1 ] = ' O ' c = a a = b b = a + cprint ( ' ' . join ( s ) ) NEW_LINE


import java . util . * ; import java . util . Arrays ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int first = 0 , second = 1 ; int [ ] a = new int [ n + 1 ] ; int count = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { int num = first + second ; if ( num > n ) { break ; } a [ i ] = num ; count ++ ; first = second ; second = num ; } for ( int i = 1 ; i <= n ; i ++ ) { int flag = 0 ; for ( int j = 1 ; j <= count ; j ++ ) { if ( i == a [ j ] ) { flag = 1 ; break ; } } if ( flag == 1 ) { System . out . print ( " O " ) ; } else { System . out . print ( " o " ) ; } } } }


import java . util . * ; import java . lang . * ; public class Solution { public static void main ( String [ ] args ) { Scanner s = new Scanner ( System . in ) ; String result = " " ; int n = s . nextInt ( ) ; int a [ ] = new int [ 1000 ] ; int b [ ] = new int [ n + 1 ] ; if ( n == 1 ) { result = result + ' O ' ; System . out . println ( result ) ; } else { a [ 0 ] = 0 ; a [ 1 ] = 1 ; for ( int i = 2 ; i < 1000 ; i ++ ) { a [ i ] = a [ i - 1 ] + a [ i - 2 ] ; } for ( int j = 1 ; j <= n ; j ++ ) { boolean c = check ( a , j ) ; if ( c == false ) { result = result + ' o ' ; } else result = result + ' O ' ; } System . out . println ( result ) ; } } public static boolean check ( int a [ ] , int j ) { for ( int i = 0 ; i < a . length ; i ++ ) { if ( a [ i ] == j ) return true ; } return false ; } }


import java . util . * ; public class contest16 { static Scanner scn = new Scanner ( System . in ) ; public static void main ( String [ ] args ) {


import java . util . * ; public class xt { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int m = sc . nextInt ( ) ; int max = n ; int min = 1 ; sc . nextLine ( ) ; for ( int i = 0 ; i < m ; i ++ ) { String s = sc . nextLine ( ) ;

[ n , m ] = map ( int , ( input ( ) . split ( ) ) ) NEW_LINE p1 = 0 NEW_LINE p2 = n + 1 NEW_LINE for j in range ( m ) : hint = input ( ) NEW_LINE ind_val = int ( hint . split ( ) [ - 1 ] ) NEW_LINE if hint [ 7 ] == ' r ' : if NEW_LINE p1 < ind_val : p1 = ind_val NEW_LINE if hint [ 7 ] == ' l ' : if NEW_LINE p2 > ind_val : p2 = ind_val   if p1 >= p2 - 1 : NEW_LINE INDENT print ( - 1 ) else : NEW_LINE print ( p2 - p1 - 1 ) NEW_LINE DEDENT


a , b = map ( int , input ( ) . split ( ) ) NEW_LINE z = [ 0 ] + [ 1 ] * afor NEW_LINE _ in " ▁ " * b : gh = input ( ) . split ( ) NEW_LINE if gh [ 2 ] == ' left ' : NEW_LINE INDENT z [ int ( gh [ - 1 ] ) : ] = [ 0 ] * ( a - int ( gh [ - 1 ] ) + 1 ) else : NEW_LINE z [ : int ( gh [ - 1 ] ) + 1 ] = [ 0 ] * ( int ( gh [ - 1 ] ) + 1 ) NEW_LINE DEDENT if z [ 1 : ] . count ( 1 ) : NEW_LINE INDENT print ( z [ 1 : ] . count ( 1 ) ) else : NEW_LINE print ( - 1 ) NEW_LINE DEDENT


n , m = map ( int , input ( ) . split ( ) ) NEW_LINE l = [ int ( i ) for i in range ( 1 , n + 1 ) ] NEW_LINE for i in range ( m ) : p = input ( ) . split ( ) NEW_LINE if p [ 2 ] == ' left ' : h = int ( p [ - 1 ] ) NEW_LINE if h not in l : if NEW_LINE min ( l ) > h : print ( - 1 ) ; NEW_LINE exit ( ) else : l = l [ : l . index ( h ) ] NEW_LINE if l == [ ] : NEW_LINE INDENT print ( - 1 ) ; exit ( ) else : NEW_LINE h = int ( p [ - 1 ] ) NEW_LINE DEDENT if h not in l : if NEW_LINE max ( l ) < h : print ( - 1 ) ; NEW_LINE exit ( ) else : l = l [ l . index ( h ) + 1 : ] NEW_LINE if l == [ ] : print ( - 1 ) ; exit ( ) NEW_LINE print ( len ( l ) ) NEW_LINE


v = [ int ( i ) for i in input ( ) . split ( ) ] NEW_LINE n = v [ 0 ] NEW_LINE m = v [ 1 ]   r = 1 l = n   ans = True   for i in range ( m ) : hint = input ( ) . split ( ) NEW_LINE vt = int ( hint [ - 1 ] ) NEW_LINE if hint [ 2 ] == ' left ' : if NEW_LINE INDENT ( vt - 1 < l ) : l = vt - 1 else : if ( vt + 1 > r ) : r = vt + 1 NEW_LINE DEDENT if l < 0 or r > n : ans = False NEW_LINE if l - r < 0 : ans = False   if ans : NEW_LINE INDENT print ( l - r + 1 ) else : NEW_LINE print ( - 1 ) NEW_LINE DEDENT


n , m = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE l , h = 1 , nfor NEW_LINE i in range ( m ) : s = input ( ) . split ( ) NEW_LINE v = int ( s [ - 1 ] ) NEW_LINE d = s [ 2 ] NEW_LINE if d == ' left ' : NEW_LINE INDENT h = min ( h , v - 1 ) else : NEW_LINE l = max ( l , v + 1 ) NEW_LINE DEDENT output = h - l + 1 NEW_LINE if output <= 0 : NEW_LINE INDENT print ( - 1 ) else : NEW_LINE print ( output ) NEW_LINE DEDENT


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 FileWriter fw ; static long oo = Long . MAX_VALUE ;

from collections import dequeif __name__ == ' _ _ main _ _ ' : n , q = map ( int , input ( ) . split ( ' ▁ ' ) ) arr = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) dq = deque ( arr ) m = max ( arr ) lst = [ ] while dq [ 0 ] != m : a = dq . popleft ( ) b = dq . popleft ( ) lst . append ( [ a , b ] ) dq . append ( min ( a , b ) ) dq . appendleft ( max ( a , b ) ) NEW_LINE


if __name__ == ' _ _ main _ _ ' : n , m = map ( int , input ( ) . split ( ' ▁ ' ) ) x = list ( map ( int , input ( ) . split ( ' ▁ ' ) ) ) y = [ int ( input ( ) ) for x in range ( m ) ]   max_index = x . index ( max ( x ) ) r = [ ] for i in range ( max_index ) : r . append ( ' { 0 } ▁ { 1 } ' . format ( x [ 0 ] , x [ 1 ] ) )   if x [ 0 ] > x [ 1 ] : k = x . pop ( 1 ) x . append ( k ) else : k = x . pop ( 0 ) x . append ( k ) for i in y : if i - 1 < max_index : print ( r [ i - 1 ] ) else : k = i - max_index - 1 print ( ' { 0 } ▁ { 1 } ' . format ( x [ 0 ] , x [ 1 + k % ( n - 1 ) ] ) )   NEW_LINE


import java . util . * ; import java . io . * ;   public class Valery_And_Deque {   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 ) {


import java . io . * ; import java . util . * ; import java . math . BigInteger ; import java . lang . Object ;    public class Main { static class sort implements Comparator < int [ ] > { public int compare ( int [ ] a , int [ ] b ) {


import java . util . * ;   public class Check2 { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { if ( n % i == 0 ) { String s1 = s . substring ( 0 , i ) ; String s2 = s . substring ( i ) ; StringBuilder stringBuilder = new StringBuilder ( s1 ) ; s = stringBuilder . reverse ( ) + s2 ;

def divisors ( n ) : divs = [ ] i = 1 while n >= i ** 2 : if n % i == 0 : divs . append ( i ) if i ** 2 != n : divs . append ( n // i ) i = i + 1 divs . sort ( ) return divs     num = int ( input ( ) ) s = input ( ) divs = divisors ( num ) for i in divs : s = s [ : i ] [ : : - 1 ] + s [ i : ]   print ( s ) NEW_LINE


n = int ( input ( ) ) s = list ( input ( ) )       for i in range ( 2 , n ) : if n % i == 0 : s [ : i ] = s [ : i ] [ : : - 1 ] NEW_LINE


import sysinput = sys . stdin . readline   n = int ( input ( ) ) s = input ( ) for i in range ( 1 , n + 1 ) : if n % i == 0 : s = s [ : i ] [ : : - 1 ] + s [ i : ] print ( s ) NEW_LINE


import sysinput = sys . stdin . readline   n = int ( input ( ) ) s = input ( ) for i in range ( 1 , n + 1 ) : if n % i : continue s = s [ : i ] [ : : - 1 ] + s [ i : ] print ( s ) NEW_LINE


import java . util . * ;   public class Example { static int [ ] dp ;   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;


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

am = int ( input ( ) ) arr = list ( input ( ) ) for i in range ( am ) : if arr [ i ] == " r " : arr [ i ] = 1 else : arr [ i ] = 0 ans = 0 NEW_LINE


n = int ( input ( ) ) l = list ( input ( ) ) x1 , x2 , y1 , y2 = 0 , 0 , 0 , 0 for i in range ( n ) : if i % 2 == 0 : if l [ i ] == ' r ' : x1 += 1 else : x2 += 1 else : if l [ i ] == ' b ' : y1 += 1 else : y2 += 1 print ( min ( max ( x1 , y1 ) , max ( x2 , y2 ) ) ) NEW_LINE


import sysinput = sys . stdin . readlinefrom collections import defaultdictopp = { " r " : " b " , " b " : " r " } def func ( n , a , want , d ) : curr = defaultdict ( int ) ans = 0 for i in range ( n ) : if a [ i ] != want [ i ] : if curr [ d [ a [ i ] ] ] > 0 : curr [ d [ a [ i ] ] ] -= 1 else : curr [ a [ i ] ] += 1 ans += 1 return ansn = int ( input ( ) ) a = input ( ) want1 = " r " want2 = " b " for i in range ( 1 , n ) : want1 += opp [ want1 [ i - 1 ] ] want2 += opp [ want2 [ i - 1 ] ] ans = func ( n , a , want1 , opp ) ans = min ( ans , func ( n , a , want2 , opp ) ) print ( ans )   NEW_LINE


import java . util . * ; public class Main {   public static void main ( String [ ] args ) {   Scanner scn = new Scanner ( System . in ) ; int n = scn . nextInt ( ) ; String str = scn . next ( ) ; int [ ] r = new int [ 2 ] ; int [ ] b = new int [ 2 ] ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) == ' r ' ) { r [ i % 2 ] ++ ; } else { b [ i % 2 ] ++ ; } } System . out . println ( Math . min ( Math . max ( r [ 0 ] , b [ 1 ] ) , Math . max ( r [ 1 ] , b [ 0 ] ) ) ) ;   } }


import java . util . * ; import java . io . * ; public class a {   public static void main ( final String [ ] args ) throws IOException { BufferInput sc = new BufferInput ( ) ; int n = sc . nextInt ( ) ; String s = sc . next ( ) ;


import java . util . * ; import java . io . * ;   public class Anatoly_And_Cockroaches {   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 ) {


import java . util . * ;   public class CodeForces719B { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; char [ ] arr = input . next ( ) . toCharArray ( ) ; int evenB = ( n + 1 ) / 2 , evenR = ( n + 1 ) / 2 ; int oddB = n / 2 , oddR = n / 2 ; for ( int i = 0 ; i < arr . length ; i ++ ) { if ( i % 2 == 0 ) { if ( arr [ i ] == ' r ' ) evenR -- ; else evenB -- ; } else { if ( arr [ i ] == ' r ' ) oddR -- ; else oddB -- ; } } System . out . println ( Math . min ( Math . max ( evenB , oddR ) , Math . max ( evenR , oddB ) ) ) ; } }


import java . util . * ;   public class B {   public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; String s = in . next ( ) ; if ( s . lastIndexOf ( ' @ ' ) == s . length ( ) - 1 || s . indexOf ( ' @ ' ) == 0 || ! s . contains ( " @ " ) ) { System . out . println ( " No ▁ solution " ) ; System . exit ( 0 ) ; } Vector < Integer > v = new Vector < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == ' @ ' ) { v . add ( i ) ; } } if ( v . size ( ) == 1 ) { System . out . println ( s ) ; } else { for ( int i = 1 ; i < v . size ( ) ; i ++ ) { if ( v . get ( i ) - v . get ( i - 1 ) <= 2 ) { System . out . println ( " No ▁ solution " ) ; System . exit ( 0 ) ; } } String result = " " ; Vector < String > vec = new Vector < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { result += s . charAt ( i ) ; if ( s . charAt ( i ) == ' @ ' ) { result += s . charAt ( i + 1 ) ; vec . add ( result ) ; result = " " ; i ++ ; } } String az = s . substring ( v . get ( v . size ( ) - 1 ) + 2 ) ; for ( int i = 0 ; i < vec . size ( ) - 1 ; i ++ ) { System . out . print ( vec . get ( i ) + " , " ) ; } System . out . print ( vec . get ( vec . size ( ) - 1 ) + " " + az ) ; } } }

a = input ( ) . split ( ' @ ' ) n = len ( a ) b = [ ] if n >= 2 : for i in range ( n ) : if len ( a [ i ] ) > int ( i != 0 and i != n - 1 ) : if i != 0 and i != n - 1 : b . append ( a [ i - 1 ] [ min ( 1 , i - 1 ) : ] + ' @ ' + a [ i ] [ 0 ] ) elif i == n - 1 : b . append ( a [ i - 1 ] [ min ( 1 , i - 1 ) : ] + ' @ ' + a [ i ] ) else : print ( ' No ▁ solution ' ) break else : c = b [ 0 ] for i in range ( 1 , len ( b ) ) : c += ' , ' + b [ i ] print ( c ) else : print ( ' No ▁ solution ' ) NEW_LINE


s = input ( ) . split ( ' @ ' ) n = len ( s ) - 1 for i in range ( 1 , n ) : if len ( s [ i ] ) < 2 : s = False break s [ i ] = s [ i ] [ 0 ] + ' , ' + s [ i ] [ 1 : ] if n > 0 and s and s [ 0 ] and s [ n ] : print ( ' @ ' . join ( s ) ) else : print ( ' No ▁ solution ' ) NEW_LINE


from sys import stdouta = input ( ) c = list ( a . split ( ' @ ' ) ) while ' ' in c : c . remove ( ' ' ) if a . count ( ' @ ' ) == 0 : exit ( print ( ' No ▁ solution ' ) ) if a . count ( ' @ ' ) != len ( c ) - 1 : exit ( print ( ' No ▁ solution ' ) ) if any ( len ( i ) == 1 for i in c [ 1 : len ( c ) - 1 ] ) : exit ( print ( ' No ▁ solution ' ) ) stdout . write ( c [ 0 ] + ' @ ' ) for i in range ( 1 , len ( c ) - 1 ) : stdout . write ( c [ i ] [ : len ( c [ i ] ) // 2 ] + ' , ' + c [ i ] [ len ( c [ i ] ) // 2 : ] + ' @ ' ) stdout . write ( c [ - 1 ] ) NEW_LINE


def main ( ) : email = input ( ) if len ( email ) < 3 or email . count ( ' @ ' ) == 0 : print ( ' No ▁ solution ' ) return if len ( email ) == 3 : if email . count ( ' @ ' ) != 1 or email [ 1 ] != ' @ ' : print ( ' No ▁ solution ' ) return pos = [ ] for i in range ( 0 , len ( email ) ) : if ( email [ i ] == ' @ ' ) : pos . append ( i ) if i == 0 or i == len ( email ) - 1 : print ( ' No ▁ solution ' ) return elif len ( pos ) >= 2 : if ( pos [ - 1 ] - pos [ - 2 ] ) <= 2 : print ( ' No ▁ solution ' ) return   ans = [ ] temp = " " atual = 2 i = 0 while ( i < len ( email ) ) : temp += email [ i ] if email [ i ] == ' @ ' : temp += email [ i + 1 ] ans . append ( temp ) i += 1 temp = " " i += 1 ans . append ( temp ) if ( len ( ans ) >= 2 ) : if ( ans [ - 1 ] . count ( ' @ ' ) == 0 ) : ans [ - 2 ] += ans [ - 1 ] del ans [ - 1 ] print ( ' , ' . join ( ans ) ) main ( ) NEW_LINE


import static java . lang . Double . parseDouble ; import static java . lang . Integer . max ; import static java . lang . Integer . min ; import static java . lang . Integer . parseInt ; import static java . lang . Long . parseLong ; import static java . lang . System . exit ; import static java . lang . System . setOut ;   import java . io . * ; import java . util . * ; import java . util . concurrent . ThreadLocalRandom ;   public class A {   static BufferedReader in ; static PrintWriter out ; static StringTokenizer tok ;   static void solve ( ) throws Exception { char [ ] s = next ( ) . toCharArray ( ) ; int n = s . length ; if ( s [ 0 ] == ' @ ' || s [ n - 1 ] == ' @ ' ) { out . print ( " No ▁ solution \n " ) ; return ; } List < Integer > ats = new ArrayList < > ( ) ; for ( int i = 1 ; i < n - 1 ; i ++ ) { if ( s [ i ] == ' @ ' ) { ats . add ( i ) ; } } int prev = - 10 ; for ( int x : ats ) { if ( x - prev <= 2 ) { out . print ( " No ▁ solution \n " ) ; return ; } prev = x ; } if ( ats . size ( ) == 0 ) { out . print ( " No ▁ solution \n " ) ; return ; }   for ( int i = 0 ; i < n ; i ++ ) { out . print ( s [ i ] ) ; if ( s [ i ] == ' @ ' ) { i ++ ; out . print ( s [ i ] ) ; out . print ( i < ats . get ( ats . size ( ) - 1 ) ? ' , ' : " " ) ; } } }


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


import java . io . * ; import java . util . * ;   public class A {   static PrintWriter out ; static class FIO { BufferedReader in ; StringTokenizer st = null ; FIO ( ) throws IOException { in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; out = new PrintWriter ( System . out ) ; st = null ; } FIO ( String s ) throws IOException { in = new BufferedReader ( new FileReader ( s + " . in " ) ) ; out = new PrintWriter ( new FileWriter ( s + " . out " ) ) ; st = null ; } String next ( ) { while ( st == null || ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( in . 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 ( ) ) ; } } static FIO in ; public static void main ( String [ ] args ) throws IOException { in = new FIO ( ) ; int tc = in . nextInt ( ) ; while ( tc -- > 0 ) new solver ( ) ; out . close ( ) ; } static class solver { void p1 ( ) { out . println ( " WIN " ) ; } void p2 ( ) { out . println ( " LOSE " ) ; } solver ( ) { int N = in . nextInt ( ) ; long [ ] ar = new long [ N ] ; for ( int i = 0 ; i < N ; ++ i ) ar [ i ] = in . nextLong ( ) ; for ( int i = 31 ; i >= 0 ; -- i ) { int oc = 0 ; for ( long x : ar ) oc += ( ( x & ( 1 << i ) ) == 0 ? 0 : 1 ) ; if ( oc % 4 == 1 ) { p1 ( ) ; return ; } if ( oc % 4 == 3 ) { if ( ( N - oc ) % 2 == 1 ) p1 ( ) ; else p2 ( ) ; return ; } } out . println ( " DRAW " ) ; } }   }

def solve ( ) : n = int ( input ( ) ) lst = list ( map ( int , input ( ) . split ( ) ) ) k = 1 while k < 10 ** 9 : k *= 2 num = 0 while k and num % 2 == 0 : num = 0 for i in lst : if i % ( k * 2 ) // k == 1 : num += 1 k //= 2 if k == 0 and num % 2 == 0 : print ( " DRAW " ) return 0 if ( num % 4 == 1 ) or ( n % 2 == 0 ) : print ( " WIN " ) else : print ( " LOSE " ) for i in range ( int ( input ( ) ) ) : solve ( ) NEW_LINE


for _ in range ( int ( input ( ) ) ) : n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) )   x = 0 for i in a : x ^= i if x == 0 : print ( " DRAW " ) continue if n % 2 == 0 : print ( " WIN " ) continue b = 0 while ( 1 << b ) <= x : b += 1 b -= 1 c = 0 for i in a : if ( 1 << b ) & i != 0 : c += 1 if ( ( c - 1 ) // 2 ) % 2 == 0 : print ( " WIN " ) else : print ( " LOSE " ) NEW_LINE


""" T = int ( input ( ) ) for ▁ _ ▁ in ▁ range ( 0 , T ) : ▁ ▁ ▁ ▁ n = int ( input ( ) ) ▁ ▁ ▁ ▁ a , b = map ( int , input ( ) . split ( ) ) ▁ ▁ ▁ ▁ s = input ( ) ▁ ▁ ▁ ▁ s = [ int ( x ) ▁ for ▁ x ▁ in ▁ input ( ) . split ( ) ] ▁ ▁ ▁ ▁ for ▁ i ▁ in ▁ range ( 0 , len ( s ) ) : ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ a , b = map ( int , input ( ) . split ( ) ) """     T = int ( input ( ) ) for _ in range ( 0 , T ) : n = int ( input ( ) ) s = [ int ( x ) for x in input ( ) . split ( ) ] pos = [ 0 ] * 35 for i in range ( 0 , len ( s ) ) : tt = bin ( s [ i ] ) [ 2 : ] tt = '0' * ( 35 - len ( tt ) ) + tt for j in range ( 35 ) : pos [ j ] += int ( tt [ j ] )   ans = ' DRAW ' turn = 0 for i in range ( 0 , 35 ) : if ( pos [ i ] % 2 != 0 ) : if ( pos [ i ] % 4 == 3 and ( n - pos [ i ] ) % 2 == 0 ) : ans = ' LOSE ' else : ans = ' WIN '   break   print ( ans ) NEW_LINE


d = { 1 : ' WIN ' , 0 : ' LOSE ' , - 1 : ' DRAW ' }   def main ( ) : t = int ( input ( ) )   for _ in range ( t ) : n = int ( input ( ) ) a = map ( int , input ( ) . split ( ) )   f = [ 0 ] * 30   for x in a : for b in range ( 30 ) : if x >> b & 1 : f [ b ] += 1   ans = - 1 for x in reversed ( range ( 30 ) ) : if f [ x ] % 2 == 1 : ans = 0 if f [ x ] % 4 == 3 and ( n - f [ x ] ) % 2 == 0 else 1 break   print ( d [ ans ] )   main ( ) NEW_LINE


# include < iostream > # include < algorithm > # include < string . h > # include < stdio . h > # include < math . h > # include < set > # include < map > # include < list > # include < vector > using namespace std ; typedef long long LL ; const int maxn = 1e5 + 3 ; int main ( ) { ios_base :: sync_with_stdio ( 0 ) , cin . tie ( 0 ) ;   int test ; cin >> test ; while ( test -- ) { int n ; cin >> n ;   int x = 0 ; vector < int > a ( n ) ; for ( auto & i : a ) { cin >> i ; x ^= i ; }   if ( x == 0 ) { cout << " DRAW \n " ; continue ; }   for ( int k = 30 ; k >= 0 ; -- k ) if ( x >> k & 1 )


import java . math . BigInteger ; import java . util . ArrayList ; 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 n = sc . nextInt ( ) ; int v [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { v [ i ] = sc . nextInt ( ) ; } int ans = - 1 ; for ( int j = 30 ; j >= 0 ; j -- ) { int cnt = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( v [ i ] & ( 1 << j ) ) > 0 ) cnt += 1 ; } if ( cnt % 2 == 0 ) { continue ; } int z = ( n - cnt ) % 2 ; cnt = ( cnt + 1 ) / 2 ; if ( cnt % 2 == 0 && z % 2 == 1 ) { ans = 1 ; break ; } else if ( cnt % 2 == 1 ) { ans = 1 ; break ; } ans = 0 ; break ; } String Ans = new String ( ) ; if ( ans == - 1 ) { Ans = " DRAW " ; } else if ( ans == 0 ) { Ans = " LOSE " ; } else { Ans = " WIN " ; } System . out . println ( Ans ) ; } } }


import java . util . * ; public class FedorAndNewGame { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) , m = sc . nextInt ( ) , k = sc . nextInt ( ) ; int [ ] arr = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) arr [ i ] = sc . nextInt ( ) ; int mask = sc . nextInt ( ) ; int ans = 0 ; for ( int x : arr ) { int temp = x ^ mask ; int cnt = 0 ; for ( int i = 0 ; i < 21 ; i ++ ) { cnt += 1 & temp ; temp = temp >> 1 ; } if ( cnt <= k ) ans ++ ; } System . out . println ( ans ) ; }   }

from math import * from copy import * from string import * NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) army = [ ] for i in range ( m ) : x = int ( input ( ) ) army . append ( x ) m = int ( input ( ) ) ans = 0     for i in army : uniq = bin ( m ^ i ) count = 0 for j in uniq : if j == '1' : count += 1 if count <= k : continue else : count = k + 1 break if count <= k : ans += 1 print ( ans )               NEW_LINE


def count ( y ) : s = 0 for i in y : if i == '1' : s += 1 return s         n , m , k = map ( int , input ( ) . split ( ) ) l = [ ] for i in range ( m + 1 ) : a = int ( input ( ) ) l . append ( a ) res = 0 f = l [ - 1 ]   for i in range ( m ) : x = l [ i ] y = bin ( f ^ x ) c = count ( y ) if c <= k : res += 1 print ( res )           NEW_LINE


n , m , k = map ( int , input ( ) . split ( ) ) army = [ ] for i in range ( m + 1 ) : army . append ( int ( input ( ) ) ) fed = army [ - 1 ] ans = 0 for i in range ( m ) : temp = bin ( fed ^ army [ i ] ) if temp . count ( "1" ) <= k : ans += 1 print ( ans ) 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 m = sc . nextInt ( ) ; int k = sc . nextInt ( ) ; int [ ] [ ] list = new int [ m + 1 ] [ n ] ; for ( int i = 0 ; i < m + 1 ; i ++ ) { int temp = sc . nextInt ( ) ; int count = 0 ; while ( true ) { if ( temp == 1 ) { list [ i ] [ count ] = temp ; break ; } else { list [ i ] [ count ] = temp % 2 ; temp = temp / 2 ; count ++ ; } } } int maxCnt = 0 ; for ( int i = 0 ; i < m ; i ++ ) { int curCnt = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( list [ i ] [ j ] == 1 && list [ m ] [ j ] == 0 ) || ( list [ i ] [ j ] == 0 && list [ m ] [ j ] == 1 ) ) { curCnt ++ ; } } if ( curCnt <= k ) { maxCnt ++ ; } } System . out . println ( maxCnt ) ; } }


import java . io . * ; import java . util . * ;      public class B {


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . StringTokenizer ;   public class NewYearAndTheChristmasPresent { public static BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;   public static void main ( String [ ] args ) throws IOException { StringTokenizer str = new StringTokenizer ( br . readLine ( ) ) ; int yellows = Integer . parseInt ( str . nextToken ( ) ) ; int blues = Integer . parseInt ( str . nextToken ( ) ) ; int reds = Integer . parseInt ( str . nextToken ( ) ) ; int total = 0 ;

a , b , c = map ( int , input ( ) . split ( ) ) print ( 3 * min ( a + 1 , b , c - 1 ) ) NEW_LINE


y , b , r = map ( int , input ( ) . split ( ) ) y = y + 2 b = b + 1 r = r + 0 min = min ( y , b , r ) sum = ( min * 3 ) - 3 print ( sum ) NEW_LINE


y , b , r = [ int ( i ) for i in input ( ) . split ( ) ] print ( 3 * min ( y + 1 , b , r - 1 ) ) NEW_LINE


temp = [ int ( x ) for x in input ( ) . split ( ) ] y = temp [ 0 ] b = temp [ 1 ] r = temp [ 2 ] if y >= b : y = b - 1 else : b = y + 1 if b >= r : b = r - 1 y = r - 2 else : r = b + 1 print ( y + b + r ) NEW_LINE


a , b , c = map ( int , input ( ) . split ( ) ) res = 0 if b >= a + 1 and c >= a + 2 : res = max ( res , ( a * 3 ) + 3 ) if a >= b - 1 and c >= b + 1 : res = max ( res , b * 3 ) if a >= c - 2 and b >= c - 1 : res = max ( res , ( c * 3 ) - 3 ) print ( res ) NEW_LINE


import java . util . * ;     import java . lang . * ; import java . io . * ;    public class Solution { 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 ; } }   private static FastReader sc = new FastReader ( ) ; public static void main ( String [ ] args ) throws java . lang . Exception { int y = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; int r = sc . nextInt ( ) ; int sum = 0 ; while ( r >= 3 ) { if ( r - 1 <= b && r - 2 <= y ) { sum = 3 * r - 3 ; break ; } r -- ; } System . out . println ( sum ) ;                                   } }


import java . util . Scanner ;   public class Ornament { public static void main ( String [ ] args ) {   Scanner in = new Scanner ( System . in ) ; int y = in . nextInt ( ) , b = in . nextInt ( ) - 1 , r = in . nextInt ( ) - 2 ;   in . close ( ) ; System . out . println ( 3 * Math . min ( Math . min ( y , b ) , r ) + 3 ) ; } }


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . PrintWriter ; import java . util . StringTokenizer ; import java . io . IOException ; import java . io . BufferedReader ; import java . io . InputStreamReader ; import java . io . InputStream ; public class Main { public static void main ( String [ ] args ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastScanner in = new FastScanner ( inputStream ) ; PrintWriter out = new PrintWriter ( outputStream ) ; A solver = new A ( ) ; solver . solve ( 1 , in , out ) ; out . close ( ) ; } static class A { public void solve ( int testNumber , FastScanner in , PrintWriter out ) { int y = in . ni ( ) , b = in . ni ( ) , r = in . ni ( ) ; b = Math . min ( b , r - 1 ) ; y = Math . min ( y , b - 1 ) ; out . println ( y * 3 + 3 ) ; } } static class FastScanner { private BufferedReader in ; private StringTokenizer st ; public FastScanner ( InputStream stream ) { in = new BufferedReader ( new InputStreamReader ( stream ) ) ; } public String ns ( ) { while ( st == null || ! st . hasMoreTokens ( ) ) { try { String rl = in . readLine ( ) ; if ( rl == null ) { return null ; } st = new StringTokenizer ( rl ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return st . nextToken ( ) ; } public int ni ( ) { return Integer . parseInt ( ns ( ) ) ; } } }


import java . util . * ; import java . math . * ; import java . io . * ;   public class CF396B { class Fraction { long n , d ; public Fraction ( long nn , long dd ) { n = nn ; d = dd ; simplify ( ) ; } void simplify ( ) { long gcd = gcd ( n , d ) ; n /= gcd ; d /= gcd ; } Fraction add ( Fraction f ) { long lcm = lcm ( d , f . d ) ; return new Fraction ( ( n * ( lcm / d ) ) + ( f . n * ( lcm / f . d ) ) , lcm ) ; } Fraction sub ( Fraction f ) { return this . add ( new Fraction ( - f . n , f . d ) ) ; } public String toString ( ) { return String . format ( " % d / % d " , n , d ) ; } } long gcd ( long a , long b ) { return b == 0 ? a : gcd ( b , a % b ) ; } long lcm ( long a , long b ) { return a / gcd ( a , b ) * b ; } int prevprime ( int x ) { for ( int i = x ; ; i -- ) if ( BigInteger . valueOf ( i ) . isProbablePrime ( 100 ) ) return i ; } int nextprime ( int x ) { for ( int i = x + 1 ; ; i ++ ) if ( BigInteger . valueOf ( i ) . isProbablePrime ( 100 ) ) return i ; } public CF396B ( ) { FS scan = new FS ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int t = scan . nextInt ( ) ; for ( int tt = 0 ; tt < t ; tt ++ ) { int n = scan . nextInt ( ) ;

T = int ( input ( ) )   MAX = 33000   bePrime = [ 0 ] * MAX ; primNum = [ ]   for j in range ( 2 , MAX ) : if bePrime [ j ] == 0 : primNum . append ( j ) i = j while i < MAX : bePrime [ i ] = 1 i = i + j   def isPrime ( a ) : for j in primNum : if j >= a : return True if a % j == 0 : return False return True   def gcd ( a , b ) : if b == 0 : return a return gcd ( b , a % b ) ;   while T > 0 : num = 0 ; n = int ( input ( ) )   m = n while isPrime ( m ) == False : m -= 1 while isPrime ( n + 1 ) == False : n += 1 num += 1   a = n - 1 b = 2 * ( n + 1 )   a = a * ( n + 1 ) * m - num * b b = b * ( n + 1 ) * m   g = gcd ( a , b ) a //= g b //= g     print ( ' { 0 } / {1 } ' . format ( a , b ) ) T -= 1 ;   NEW_LINE


def prime ( n ) : m = int ( n ** 0.5 ) + 1 t = [ 1 ] * ( n + 1 ) for i in range ( 3 , m ) : if t [ i ] : t [ i * i : : 2 * i ] = [ 0 ] * ( ( n - i * i ) // ( 2 * i ) + 1 ) return [ 2 ] + [ i for i in range ( 3 , n + 1 , 2 ) if t [ i ] ]   def gcd ( a , b ) : c = a % b return gcd ( b , c ) if c else b   p = prime ( 31650 ) def g ( n ) : m = int ( n ** 0.5 ) for j in p : if n % j == 0 : return True if j > m : return False   def f ( n ) : a , b = n , n + 1 while g ( a ) : a -= 1 while g ( b ) : b += 1 p , q = ( b - 2 ) * a + 2 * ( n - b + 1 ) , 2 * a * b d = gcd ( p , q ) print ( str ( p // d ) + ' / ' + str ( q // d ) )   for i in range ( int ( input ( ) ) ) : f ( int ( input ( ) ) ) NEW_LINE


def isPrime ( n ) : i = 2 while i * i <= n : if n % i == 0 : return False i += 1 return True   def prevPrime ( n ) : while not isPrime ( n ) : n -= 1 return n   def nextPrime ( n ) : n += 1 while not isPrime ( n ) : n += 1 return n   def gcd ( a , b ) : while ( a ) : b %= a a , b = b , a return b ;   def solve ( ) : n = int ( input ( ) ) prev = prevPrime ( n ) ; next = nextPrime ( n ) ; num1 = prev - 2 ; den1 = prev * 2 ; g = gcd ( num1 , den1 ) ; num1 //= g ; den1 //= g ; num2 = n - prev + 1 ; den2 = prev * next ; g = gcd ( num2 , den2 ) ; num2 //= g ; den2 //= g ; g = gcd ( num1 * den2 + num2 * den1 , den1 * den2 ) ; x = ( num1 * den2 + num2 * den1 ) // g ; y = den1 * den2 // g ; print ( ' { } / { } ' . format ( x , y ) )   t = int ( input ( ) ) while t : t -= 1 solve ( ) NEW_LINE


import java . io . * ; import java . math . BigInteger ; public class Main { static PrintWriter pw = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; public static void main ( String [ ] args ) throws IOException { BufferedReader bf = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( bf . readLine ( ) ) ; int n = 0 ; for ( int i = 0 ; i < t ; i ++ ) { n = Integer . parseInt ( bf . readLine ( ) ) ; solve ( n ) ; } pw . flush ( ) ; } public static void solve ( int n ) { long u = n , v = n + 1 ; while ( ! BigInteger . valueOf ( u ) . isProbablePrime ( 10 ) ) u -- ; while ( ! BigInteger . valueOf ( v ) . isProbablePrime ( 10 ) ) v ++ ; long a = v * ( u - 2 ) + 2 * ( n - u + 1 ) , b = 2 * u * v ; long g = gcd ( a , b ) ; pw . write ( a / g + " / " + b / g + " \n " ) ; } static long gcd ( long a , long b ) { return b == 0 ? a : gcd ( b , a % b ) ; } }


import java . io . * ; import java . util . * ;


import java . io . OutputStream ; import java . io . IOException ; import java . io . InputStream ; import java . io . OutputStream ; import java . io . IOException ; import java . util . Random ; import java . io . UncheckedIOException ; import java . math . BigDecimal ; import java . io . Closeable ; import java . io . Writer ; import java . io . OutputStreamWriter ; import java . math . BigInteger ; import java . io . InputStream ; import java . math . RoundingMode ;   public class Main { public static void main ( String [ ] args ) throws Exception { Thread thread = new Thread ( null , new TaskAdapter ( ) , " " , 1 << 29 ) ; thread . start ( ) ; thread . join ( ) ; }   static class TaskAdapter implements Runnable { @ Override public void run ( ) { InputStream inputStream = System . in ; OutputStream outputStream = System . out ; FastInput in = new FastInput ( inputStream ) ; FastOutput out = new FastOutput ( outputStream ) ; BOnSumOfFractions solver = new BOnSumOfFractions ( ) ; int testCount = Integer . parseInt ( in . next ( ) ) ; for ( int i = 1 ; i <= testCount ; i ++ ) solver . solve ( i , in , out ) ; out . close ( ) ; } }   static class BOnSumOfFractions { public void solve ( int testNumber , FastInput in , FastOutput out ) { int n = in . ri ( ) ; if ( n == 2 ) { out . println ( "1/6" ) ; return ; } int p1 = prev ( n ) ; int next = next ( n + 1 ) ;


import java . util . Scanner ;   public class srf { static Scanner sc = new Scanner ( System . in ) ; public static void main ( String [ ] args ) { int n = sc . nextInt ( ) , start = sc . nextInt ( ) , x = sc . nextInt ( ) ; Ans argmax = query ( start ) ;

import randomimport sys   def process ( n , start , X ) : ran = [ start ] + list ( set ( [ random . randint ( 1 , n ) for _ in range ( 990 ) ] ) ) arr = [ ask ( index ) [ 0 ] for index in ran ] pos , init = find ( ran , arr , X ) ans = - 1 if pos == None : ans = arr [ 0 ] elif init == X : ans = init else : cur = init cnt = 0 while cnt <= 999 : cur , pos = ask ( pos ) if cur >= X : ans = cur break if pos == - 1 : break cnt += 1 print ( ' ! ▁ { } ' . format ( ans ) ) def find ( ran , arr , X ) : diff = float ( ' inf ' ) pos , init = None , None for i , x in zip ( ran , arr ) : if x <= X and abs ( x - X ) < diff : diff = abs ( x - X ) pos = i init = x return pos , init def ask ( index ) : print ( ' ? ▁ { } ' . format ( index ) ) sys . stdout . flush ( ) val_ , next_ = map ( int , input ( ) . split ( ) ) return val_ , next_                   n , start , X = map ( int , input ( ) . split ( ) ) process ( n , start , X ) NEW_LINE


import java . io . BufferedReader ; import java . io . File ; import java . io . FileInputStream ; import java . io . FileNotFoundException ; import java . io . FileOutputStream ; import java . io . InputStreamReader ; import java . io . PrintWriter ; import java . math . BigInteger ; import java . util . ArrayList ; import java . util . Arrays ; import java . util . BitSet ; import java . util . Calendar ; import java . util . Collections ; import java . util . Comparator ; import java . util . HashMap ; import java . util . HashSet ; import java . util . LinkedList ; import java . util . PriorityQueue ; import java . util . SortedSet ; import java . util . Random ; import java . util . StringTokenizer ; import java . util . TreeMap ; import java . util . TreeSet ;   public class B_AimTech_Round4 {   public static long MOD = 1000000007 ;   public static void main ( String [ ] args ) throws FileNotFoundException {


import java . io . * ; import java . util . * ; import java . math . * ;   public class Hello { 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 in = new FastReader ( ) ;

n = int ( input ( ) ) input_types = input ( ) . split ( " ▁ " ) types = [ int ( i ) for i in input_types ]   input_vertex = input ( ) . split ( " ▁ " ) prev = [ 0 for i in range ( n ) ] cntFrom = [ 0 for i in range ( n ) ]   for i in range ( n ) : prev [ i ] = int ( input_vertex [ i ] ) prev [ i ] -= 1 if ( prev [ i ] != - 1 ) : cntFrom [ prev [ i ] ] += 1   ans = [ ] for i in range ( n ) : if types [ i ] == 1 : curV = i cur = [ ] while prev [ curV ] != - 1 and cntFrom [ prev [ curV ] ] <= 1 : cur . append ( curV ) curV = prev [ curV ] cur . append ( curV ) if len ( ans ) < len ( cur ) : ans = cur   ans_alt = [ str ( i + 1 ) for i in ans [ : : - 1 ] ] print ( len ( ans_alt ) ) print ( ' ▁ ' . join ( ans_alt ) ) NEW_LINE


n = int ( input ( ) ) t = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) ) a = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )   ans , cnt = [ ] , [ 0 for i in range ( n + 1 ) ]   for i in a : cnt [ i ] += 1   for i in range ( 1 , n + 1 ) : if t [ i ] == 1 : crt = [ i ] x = a [ i ] while cnt [ x ] == 1 : crt . append ( x ) x = a [ x ] if len ( crt ) > len ( ans ) : ans = crt [ : ] ans . reverse ( ) print ( len ( ans ) ) print ( ' ▁ ' . join ( map ( str , ans ) ) )   NEW_LINE


n = int ( input ( ) ) t = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) ) a = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )   ans , cnt = [ ] , [ 0 for i in range ( n + 1 ) ]   for i in a : cnt [ i ] += 1   for i in range ( 1 , n + 1 ) : if t [ i ] == 1 : crt = [ i ] x = a [ i ] while cnt [ x ] == 1 : crt . append ( x ) x = a [ x ] if len ( crt ) > len ( ans ) : ans = crt [ : ] ans . reverse ( ) print ( len ( ans ) ) print ( ' ▁ ' . join ( map ( str , ans ) ) ) NEW_LINE


n = int ( input ( ) )   t = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )   a = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )       ans , cnt = [ ] , [ 0 for i in range ( n + 1 ) ]       for i in a :   cnt [ i ] += 1       for i in range ( 1 , n + 1 ) :   if t [ i ] == 1 :   crt = [ i ]   x = a [ i ]   while cnt [ x ] == 1 :   crt . append ( x )   x = a [ x ]   if len ( crt ) > len ( ans ) :   ans = crt [ : ]   ans . reverse ( )   print ( len ( ans ) )   print ( ' ▁ ' . join ( map ( str , ans ) ) )       NEW_LINE


n = int ( input ( ) ) t = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) ) a = [ 0 ] + list ( map ( int , input ( ) . split ( ) ) )   res , cnt = [ ] , [ 0 ] * ( n + 1 ) for i in a : cnt [ i ] += 1 for i in range ( 1 , n + 1 ) : if t [ i ] == 0 : continue curr_res = [ i ] x = a [ i ] while cnt [ x ] == 1 : curr_res . append ( x ) x = a [ x ] if len ( curr_res ) > len ( res ) : res = curr_res [ : ] res . reverse ( ) print ( len ( res ) ) print ( * res ) NEW_LINE


import java . util . LinkedList ; import java . util . Scanner ;   public class Main { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] parents = new int [ n ] ; int [ ] k = new int [ n ] ; LinkedList < Integer > hotels = new LinkedList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( sc . nextInt ( ) == 1 ) { hotels . add ( i ) ; } } for ( int i = 0 ; i < n ; i ++ ) { parents [ i ] = sc . nextInt ( ) - 1 ; if ( parents [ i ] != - 1 ) { k [ parents [ i ] ] ++ ; } } LinkedList < Integer > bestPath = null ; for ( int h : hotels ) { LinkedList < Integer > path = new LinkedList < > ( ) ; path . addFirst ( h ) ; while ( true ) { int prev = parents [ path . getFirst ( ) ] ; if ( prev == - 1 ) { break ; } if ( k [ prev ] > 1 ) { break ; } path . addFirst ( prev ) ; } if ( bestPath == null || bestPath . size ( ) < path . size ( ) ) { bestPath = path ; } } System . out . println ( bestPath . size ( ) ) ; for ( int v : bestPath ) { System . out . print ( v + 1 + " ▁ " ) ; } } }


import java . util . * ; import java . io . * ;   public class Main4 {   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int objects = sc . nextInt ( ) ; int [ ] types = new int [ objects ] ; for ( int i = 0 ; i < objects ; i ++ ) { types [ i ] = sc . nextInt ( ) ; }   int [ ] skiTrack = new int [ objects ] ; int [ ] count = new int [ objects ] ;   for ( int i = 0 ; i < objects ; i ++ ) {


import java . util . * ; import java . io . * ;   public class Resort { InputStream is ; PrintWriter out ; String INPUT = " " ;   void solve ( ) throws IOException { int n = ni ( ) ; boolean [ ] mountain = new boolean [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) mountain [ i ] = ni ( ) == 0 ;   int [ ] parent = new int [ n + 1 ] ; int [ ] outdegree = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { parent [ i ] = ni ( ) ; outdegree [ parent [ i ] ] ++ ; }   ArrayList < ArrayList < Integer > > list = new ArrayList < > ( ) ; for ( int i = 0 ; i <= n ; i ++ ) list . add ( new ArrayList < > ( ) ) ;   int [ ] indegree = new int [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { if ( outdegree [ parent [ i ] ] > 1 || outdegree [ i ] > 2 || parent [ i ] == 0 ) continue ; list . get ( parent [ i ] ) . add ( i ) ; indegree [ i ] ++ ; }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ;   public class CF1311A { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; while ( t -- > 0 ) { int [ ] ab = Arrays . stream ( br . readLine ( ) . split ( " \\ s + " ) ) . mapToInt ( Integer :: parseInt ) . toArray ( ) ; System . out . println ( ab [ 0 ] == ab [ 1 ] ? 0 : ab [ 0 ] < ab [ 1 ] ? ( ( ab [ 1 ] - ab [ 0 ] - 1 ) & 1 ) + 1 : ( ( ab [ 0 ] - ab [ 1 ] ) & 1 ) + 1 ) ; } } }

t = int ( input ( ) ) for _ in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) if ( abs ( a - b ) == 0 ) : print ( '0' ) elif ( abs ( a - b ) % 2 == 0 and a - abs ( a - b ) == b ) : print ( '1' ) elif ( abs ( a - b ) % 2 == 0 and a - abs ( a - b ) != b ) : print ( '2' ) elif ( abs ( a - b ) % 2 != 0 and a + abs ( a - b ) == b ) : print ( '1' ) else : print ( '2' ) NEW_LINE


t = int ( input ( ) )   while t > 0 : count = 0   a , b = map ( int , input ( ) . split ( ) )   if a > b : a = a - b if a % 2 == 0 : count += 1 else : count += 2 elif b > a : b = b - a if b % 2 == 0 : count += 2 else : count += 1   print ( count )   t -= 1 NEW_LINE


for _ in range ( int ( input ( ) ) ) : a , b = map ( int , input ( ) . split ( ) ) if a == b : print ( 0 ) elif a > b : if ( a - b ) % 2 == 0 : print ( 1 ) else : print ( 2 ) else : if ( a - b ) % 2 == 0 : print ( 2 ) else : print ( 1 ) NEW_LINE


def main ( ) : t = int ( input ( ) ) for _ in range ( t ) : a , b = map ( int , input ( ) . split ( ) ) val = b - a if val == 0 : print ( 0 ) elif val > 0 : if val % 2 != 0 : print ( 1 ) else : print ( 2 ) else : if val % 2 == 0 : print ( 1 ) else : print ( 2 )     if __name__ == ' _ _ main _ _ ' : main ( ) NEW_LINE


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Arrays ;   public class CF1311A { public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; int t = Integer . parseInt ( br . readLine ( ) ) ; while ( t -- > 0 ) { int [ ] ab = Arrays . stream ( br . readLine ( ) . split ( " \\ s + " ) ) . mapToInt ( Integer :: parseInt ) . toArray ( ) ; int ans = - 1 ; if ( ab [ 0 ] == ab [ 1 ] ) { ans = 0 ; } else if ( ab [ 0 ] < ab [ 1 ] ) { ans = ( ( ab [ 1 ] - ab [ 0 ] - 1 ) & 1 ) + 1 ; } else { ans = ( ( ab [ 0 ] - ab [ 1 ] ) & 1 ) + 1 ; } System . out . println ( ans ) ; } } }


import java . util . Scanner ;   public class A1311 { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int t = scanner . nextInt ( ) ; for ( int i = 0 ; i < t ; i ++ ) { int a = scanner . nextInt ( ) ; int b = scanner . nextInt ( ) ;   if ( a == b ) { System . out . println ( 0 ) ; } else if ( a > b && ( a - b ) % 2 == 1 ) { System . out . println ( 2 ) ; } else if ( a > b && ( a - b ) % 2 == 0 ) { System . out . println ( 1 ) ; } else if ( a < b && ( b - a ) % 2 == 1 ) { System . out . println ( 1 ) ; } else if ( a < b && ( b - a ) % 2 == 0 ) { System . out . println ( 2 ) ; } } } }


import java . io . * ; import java . util . StringTokenizer ;   public class A1311 { public static void main ( String [ ] args ) throws IOException { PrintWriter out = new PrintWriter ( System . out ) ; FastScanner fs = new FastScanner ( ) ; int tc = fs . nextInt ( ) ; for ( int _ = 0 ; _ < tc ; _ ++ ) { int A = fs . nextInt ( ) , B = fs . nextInt ( ) ; if ( A == B ) { out . println ( 0 ) ; } else if ( ( A > B && ( ( ( A - B ) & 1 ) ) == 0 ) || ( B > A && ( ( B - A ) & 1 ) == 1 ) ) { out . println ( 1 ) ; } else { out . println ( 2 ) ; } } out . close ( ) ; }   static class FastScanner { BufferedReader br ; StringTokenizer st ;   public FastScanner ( ) { br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; }   public FastScanner ( String filePath ) throws FileNotFoundException { try { br = new BufferedReader ( new FileReader ( filePath ) ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } }   String next ( ) throws IOException { while ( st == null || ! st . hasMoreTokens ( ) ) { try { st = new StringTokenizer ( br . readLine ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw e ; } } return st . nextToken ( ) ; }   String nextLine ( ) throws IOException { String str ; try { str = br . readLine ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw e ; } return str ; }   int nextInt ( ) throws IOException { return Integer . parseInt ( this . next ( ) ) ; }   long nextLong ( ) throws IOException { return Long . parseLong ( this . next ( ) ) ; } } }


import java . util . * ;   public class Solutions { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; while ( t -- > 0 ) { int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; if ( a == b ) { System . out . println ( 0 ) ; } else if ( a < b ) { System . out . println ( ( b - a ) % 2 == 1 ? 1 : 2 ) ; } else { System . out . println ( ( a - b ) % 2 == 1 ? 2 : 1 ) ; } } } }


import java . lang . reflect . Array ; import java . text . CollationElementIterator ; import java . util . * ; import java . util . Map . Entry ; import java . io . * ; import java . lang . Math . * ; import java . math . BigInteger ;   import static java . lang . Math . * ; import static java . lang . System . * ; import static java . util . Arrays . fill ; import static java . util . Arrays . spliterator ; public class ContestMain implements Runnable { private static Reader in = new Reader ( ) ; private static StringBuilder ans = new StringBuilder ( ) ; private static long MOD = ( long ) ( 1e9 + 7 ) ; private static final int N = ( int ) ( 2e5 + 7 ) ;

import bisectfrom sys import stdinn = int ( input ( ) ) a , b = [ ] , [ ] for i in range ( n ) : l , * s = map ( int , stdin . readline ( ) . split ( ) ) if sorted ( s ) == s [ : : - 1 ] : a . append ( s [ 0 ] ) b . append ( s [ - 1 ] ) a . sort ( ) print ( n * n - sum ( [ bisect . bisect_right ( a , bb ) for bb in b ] ) ) NEW_LINE


import bisectn = int ( input ( ) ) m1 = [ 0 ] * nm2 = [ ] m3 = [ 0 ] * nfor i in range ( n ) : arr = list ( map ( int , input ( ) . split ( ) ) ) [ 1 : ] k1 , k2 , k3 = float ( ' inf ' ) , float ( " - inf " ) , 0 for c in arr : if c > k1 : k3 = 1 k1 = min ( k1 , c ) k2 = max ( k2 , c ) m3 [ i ] = k3 if k3 == 0 : m1 [ i ] = k1 m2 . append ( k2 ) m2 . sort ( ) ans = 0 st = sum ( m3 ) for i in range ( n ) : if m3 [ i ] : ans += n else : j = bisect . bisect_left ( m2 , m1 [ i ] + 1 ) ans += len ( m2 ) - j + stprint ( ans ) NEW_LINE


import bisectn = int ( input ( ) ) f = [ ] l = [ ] for i in range ( n ) : a = list ( map ( int , input ( ) . split ( ) ) ) a = a [ 1 : ] if sorted ( a ) == a [ : : - 1 ] : f . append ( a [ 0 ] ) l . append ( a [ - 1 ] ) f . sort ( ) l . sort ( ) ans = 0 for i in range ( len ( f ) ) : pos = bisect . bisect_right ( f , l [ i ] ) ans += posprint ( n * n - ans ) NEW_LINE


from os import path ; import sys , timemod = int ( 1e9 + 7 ) from math import ceil , floor , gcd , log , log2 , factorial , sqrtfrom collections import defaultdict , Counter , OrderedDict , deque ; from itertools import combinations , permutations NEW_LINE


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

n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) f = [ 0 ] * ( max ( a ) + 1 ) for i in a : f [ i ] += 1 c = 0 for i in f : if ( i % 2 != 0 ) : c = 1 breakif ( c == 0 ) : print ( ' Agasa ' ) else : print ( ' Conan ' ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) ) l1 = [ 0 ] * 100001 for item in a : l1 [ item ] += 1 ans = " Agasa " for item in l1 : if item % 2 : ans = " Conan " ; breakprint ( ans ) NEW_LINE


n = int ( input ( ) ) a = list ( map ( int , input ( ) . split ( ) ) )   a . sort ( reverse = True ) ai = [ 1 ] * n   j = 0 for i in range ( 1 , n ) : if a [ i ] == a [ i - 1 ] : ai [ j ] += 1 else : j += 1   ai = ai [ : j + 1 ]   conan = Falsefor i in ai : if i % 2 : conan = True break   print ( " Conan " if conan else " Agasa " ) NEW_LINE


input ( ) q , t = { } , 0 a = list ( map ( int , input ( ) . split ( ) ) ) for i in a : q [ i ] = q . get ( i , 0 ) + 1 for i in q : if q [ i ] & 1 : t = 1 ; breakprint ( " Conan " if t else " Agasa " ) NEW_LINE


import java . util . * ; public class square { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int [ ] num = new int [ 100001 ] ; for ( int i = 1 ; i <= n ; i ++ ) { int p = sc . nextInt ( ) ; num [ p ] ++ ; } for ( int i = 1 ; i <= 100000 ; i ++ ) if ( num [ i ] % 2 != 0 ) { System . out . println ( " Conan " ) ; return ; } System . out . println ( " Agasa " ) ; } }


import java . util . * ;   public class CodeForces914B { public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int [ ] a = new int [ 100000 + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ input . nextInt ( ) ] ++ ; } String ans = " Agasa " ; for ( int i = 1 ; i < a . length ; i ++ ) { if ( a [ i ] % 2 != 0 ) { ans = " Conan " ; break ; } }   System . out . println ( ans ) ;   } }


import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . List ; import java . util . stream . Collectors ; import java . util . stream . Stream ;   public class Codeforces914B {   public static void main ( String [ ] args ) throws NumberFormatException , IOException {


import java . util . * ;   public class StackBracket { public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; long a = sc . nextLong ( ) ; long b = sc . nextLong ( ) ; long x = sc . nextLong ( ) ; long y = sc . nextLong ( ) ; long c = 0 ; long gcd = gcd ( x , y ) ; x = x / gcd ; y = y / gcd ; long a1 = a / x ; long a2 = b / y ; System . out . println ( Math . min ( a1 , a2 ) ) ;

max_width , max_height , x , y = map ( int , input ( ) . split ( ) )       def hcf ( num1 , num2 ) : if ( num2 == 0 ) : return num1 return hcf ( num2 , num1 % num2 )   ratio = 0 ratio = hcf ( x , y ) if ( ratio != 0 ) : x = x // ratio y = y // ratio posible_width = max_width // x possible_height = max_height // y       print ( min ( possible_height , posible_width ) )   NEW_LINE


import matha , b , x , y = map ( int , input ( ) . split ( ) ) g = math . gcd ( x , y ) x //= gy //= gprint ( min ( a // x , b // y ) ) NEW_LINE


import math   a , b , x , y = map ( int , input ( ) . split ( ) ) c = math . gcd ( x , y ) x //= cy //= cans = min ( a // x , b // y ) print ( ans ) NEW_LINE


import matha , b , x , y = map ( int , input ( ) . split ( ) ) d = math . gcd ( x , y ) print ( min ( a * d // x , b * d // y ) ) NEW_LINE


import java . util . * ;   public class Example { static int [ ] dp ;   public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ;


import java . util . Scanner ;   public class _0705BuyingaTVSet { static long gcd ( long a , long b ) {


import java . util . * ; import java . util . Scanner ; import java . io . * ; import java . io . BufferedReader ; import java . io . IOException ; import java . io . InputStreamReader ; import java . util . Scanner ; import java . util . StringTokenizer ;   import javax . lang . model . util . ElementScanner6 ;   public class B567 { 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 in = new FastReader ( ) ; int t = 1 ;

from sys import stdin , stdoutfrom os import pathrd = lambda : stdin . readline ( ) . strip ( ) wr = stdout . writeif ( path . exists ( ' input . txt ' ) ) : stdin = open ( " input . txt " , " r " ) import time , math NEW_LINE


n = int ( input ( ) ) a = [ ] for i in range ( n ) : s = input ( ) a . append ( s ) lst = [ 0 ] * 1000000 before = [ ] for i in range ( n ) : sign = a [ i ] [ 0 ] val = int ( a [ i ] [ 2 : ] ) if sign == " + " : lst [ val - 1 ] = 1 else : if not lst [ val - 1 ] : before . append ( val ) mx = len ( before ) ans = mxfor i in range ( n ) : sign = a [ i ] [ 0 ] val = int ( a [ i ] [ 2 : ] ) if sign == " + " : mx += 1 ans = max ( mx , ans ) else : mx -= 1 print ( ans ) NEW_LINE


n , l , m , a = int ( input ( ) ) , [ 0 ] * 1000000 , 0 , [ ] for _ in range ( n ) : a . append ( input ( ) ) for i in range ( n ) : v = int ( a [ i ] [ 2 : ] ) if a [ i ] [ 0 ] == ' + ' : l [ v - 1 ] = 1 elif not l [ v - 1 ] : m += 1 ans = mfor i in range ( n ) : if a [ i ] [ 0 ] == ' + ' : m += 1 ; ans = max ( m , ans ) else : m -= 1 print ( ans ) NEW_LINE


n = int ( input ( ) ) seats = [ False for x in range ( 1 , 1000010 ) ] ans = 0 state = 0 for x in range ( n ) : di , idd = input ( ) . split ( ) idd = int ( idd ) if di == ' + ' : seats [ idd ] = True state += 1 ans = max ( ans , state ) elif di == ' - ' : if seats [ idd ] == False : ans += 1 else : state -= 1 ans = max ( ans , state ) seats [ idd ] = Falseprint ( ans ) NEW_LINE


n = int ( input ( ) ) mp = dict ( ) ans , cur = 0 , 0   for i in range ( n ) : c , x = [ _ for _ in input ( ) . split ( ) ] x = int ( x ) if c == ' - ' : if mp . get ( x ) == True : cur -= 1 mp [ x ] = False elif mp . get ( x ) is None : ans += 1 mp [ x ] = False elif c == ' + ' : cur += 1 mp [ x ] = True ans = max ( ans , cur ) print ( ans ) NEW_LINE


import java . io . * ; import java . util . * ; public class Main {   public static void main ( String [ ] args ) { InputReader sc = new InputReader ( System . in ) ; PrintWriter pw = new PrintWriter ( System . out ) ; Random gen = new Random ( ) ; int test = 1 ;


import java . util . Scanner ;   public class ArrayList { public static void main ( String [ ] args ) {    Scanner sc = new Scanner ( System . in ) ; int n = sc . nextInt ( ) ; int min = 0 , c = 0 ; boolean f [ ] = new boolean [ 10000001 ] ; for ( int i = 0 ; i < n ; i ++ ) { String s = sc . next ( ) ; int r = sc . nextInt ( ) ; if ( s . charAt ( 0 ) == ' - ' ) { if ( ! f [ r ] ) min ++ ; else c -- ; } else c ++ ; f [ r ] = true ; if ( c > min ) min = c ;   } System . out . println ( min ) ;   } }