#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
main() {
  int i, t, n;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    scanf("%d", &n);
    char s[n];
    scanf("%s", s);
    if (s[0] == 'R')
      printf("Rounak");
    if (s[0] == 'G')
      printf("Sanchit");
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f3 <main+0xd3>
lea    0xea5(%rip),%rdi
xor    %eax,%eax
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x28(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x52,%eax
jne    11b6 <main+0x96>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x47,%eax
jne    11d2 <main+0xb2>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebb(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    11e7 <main+0xb7>
xor    %r13d,%r13d
jmp    1177 <main+0x47>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rsp
add    $0x1,%r13d
cmp    -0x2c(%rbp),%r13d
jge    11e7 <main+0xb7>
lea    0xe82(%rip),%rdi
lea    -0x30(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rsp,%r14
mov    -0x30(%rbp),%r15d
mov    %rsp,%rbx
add    $0xf,%r15
and    $0xfffffffffffffff0,%r15
mov    %rbx,%r12
sub    %r15,%r12
mov    %r12,%rsp
neg    %r15
lea    0xe55(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movzbl (%rbx,%r15,1),%eax
cmp    $0x52,%al
jne    11d2 <main+0xa2>
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
movzbl (%r12),%eax
cmp    $0x47,%al
jne    1160 <main+0x30>
lea    0xe30(%rip),%rdi
call   1040 <printf@plt>
jmp    1160 <main+0x30>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [7 x i8] c"Rounak\00"
@.str.3 = [8 x i8] c"Sanchit\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 0, i32* %2
br label %8
8: ; preds = %35, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %38
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %5
%17 = alloca i8, i64 %15
store i64 %15, i64* %6
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds i8, i8* %17, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 82
br i1 %22, label %23, label %25
23: ; preds = %12
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %12
%26 = getelementptr inbounds i8, i8* %17, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 71
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %30, %25
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%34 = load i8*, i8** %5
br label %35
35: ; preds = %32
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
br label %8
38: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [7 x i8] c"Rounak\00"
@.str.3 = [8 x i8] c"Sanchit\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %31
8: ; preds = %0, %26
%9 = phi i32 [ %28, %26 ], [ 0, %0 ]
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
%14 = alloca i8, i64 %12
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 82
br i1 %17, label %18, label %21
18: ; preds = %8
%19 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = load i8, i8* %14
br label %21
21: ; preds = %18, %8
%22 = phi i8 [ %20, %18 ], [ %16, %8 ]
%23 = icmp eq i8 %22, 71
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %24, %21
%27 = call i32 @putchar(i32 10)
%28 = add nuw nsw i32 %9, 1
%29 = load i32, i32* %1
%30 = icmp slt i32 %28, %29
br i1 %30, label %8, label %31
31: ; preds = %26, %0
ret i32 0
}