#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 *, ...);
int /*<<< orphan*/ *strchr(char *, char);
int main() {
  char seg[51];
  short t;
  scanf("%hd", &t);
  while (t--) {
    scanf("%s", seg);
    if (strchr(seg, 'D') == NULL) {
      printf("Possible\n");
    } else {
      printf("You shall not pass!\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x42(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x42(%rbp),%ax
mov    %ax,%cx
add    $0xffff,%cx
mov    %cx,-0x42(%rbp)
cmp    $0x0,%ax
je     11b6 <main+0x86>
lea    -0x40(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x44,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    11a5 <main+0x75>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
jmp    11b1 <main+0x81>
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
jmp    1151 <main+0x21>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xebe(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subw   $0x1,0xe(%rsp)
jb     11a1 <main+0x71>
lea    0xea7(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xeb2(%rip),%r15
lea    0xe97(%rip),%r12
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
call   1040 <strchr@plt>
test   %rax,%rax
mov    %r12,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
subw   $0x1,0xe(%rsp)
jae    1170 <main+0x40>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%hd\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [10 x i8] c"Possible\0A\00"
@.str.3 = [21 x i8] c"You shall not pass!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [51 x i8]
%3 = alloca i16
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %3)
br label %5
5: ; preds = %19, %0
%6 = load i16, i16* %3
%7 = add i16 %6, -1
store i16 %7, i16* %3
%8 = icmp ne i16 %6, 0
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%13 = call i32* @strchr(i8* %12, i8 signext 68)
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %19
17: ; preds = %9
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %5
20: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%hd\00"
@.str.1 = [3 x i8] c"%s\00"
@str = [20 x i8] c"You shall not pass!\00"
@str.4 = [9 x i8] c"Possible\00"
define i32 @main() {
%1 = alloca [51 x i8]
%2 = alloca i16
%3 = getelementptr inbounds [51 x i8], [51 x i8]* %1, i64 0, i64 0
%4 = bitcast i16* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %2)
%6 = load i16, i16* %2
%7 = add i16 %6, -1
store i16 %7, i16* %2
%8 = icmp eq i16 %6, 0
br i1 %8, label %18, label %9
9: ; preds = %0, %9
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%11 = call i32* @strchr(i8* %3, i8 signext 68)
%12 = icmp eq i32* %11, null
%13 = select i1 %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%14 = call i32 @puts(i8* dereferenceable(1) %13)
%15 = load i16, i16* %2
%16 = add i16 %15, -1
store i16 %16, i16* %2
%17 = icmp eq i16 %15, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %0
ret i32 0
}