#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 strlen(char *);
void main() {
  int t, i, out = 0;
  char str[101];
  scanf("%d", &t);
  while (t--) {
    scanf("%s", str);
    for (i = 0; i < strlen(str); i++) {
      if (str[i] == 'D' || str[i] == '0' || str[i] == 'j')
        out = out + 1;
    }
    if (out > 0)
      printf("YES\n");
    else
      printf("NO\n");
    out = 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1228 <main+0xf8>
lea    -0x80(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
cmp    %ecx,%eax
jge    11f5 <main+0xc5>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x44,%eax
je     11d9 <main+0xa9>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x30,%eax
je     11d9 <main+0xa9>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x6a,%eax
jne    11e2 <main+0xb2>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11e7 <main+0xb7>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1181 <main+0x51>
cmpl   $0x0,-0xc(%rbp)
jle    1210 <main+0xe0>
lea    0xe00(%rip),%rdi
call   1040 <printf@plt>
jmp    121c <main+0xec>
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
jmp    1154 <main+0x24>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0xc(%rsp)
jae    1167 <main+0x37>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe95(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe8f(%rip),%r15
movabs $0x400000000100001,%r12
jmp    11a3 <main+0x73>
cs nopw 0x0(%rax,%rax,1)
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
subl   $0x1,0xc(%rsp)
jb     1158 <main+0x28>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1190 <main+0x60>
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    11e3 <main+0xb3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbp
jge    1200 <main+0xd0>
movzbl 0x10(%rsp,%rbp,1),%eax
add    $0xd0,%al
cmp    $0x3a,%al
ja     11d0 <main+0xa0>
movzbl %al,%eax
bt     %rax,%r12
jae    11d0 <main+0xa0>
add    $0x1,%r13d
jmp    11d0 <main+0xa0>
nopl   (%rax)
mov    %r15,%rdi
test   %r13d,%r13d
jg     1197 <main+0x67>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"YES\0A\00"
@.str.3 = [4 x i8] c"NO\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [101 x i8]
store i32 0, i32* %3
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
br label %6
6: ; preds = %53, %0
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
store i32 %8, i32* %1
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %54
10: ; preds = %6
%11 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
store i32 0, i32* %2
br label %13
13: ; preds = %43, %10
%14 = load i32, i32* %2
%15 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = icmp slt i32 %14, %16
br i1 %17, label %18, label %46
18: ; preds = %13
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 68
br i1 %24, label %39, label %25
25: ; preds = %18
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 48
br i1 %31, label %39, label %32
32: ; preds = %25
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 106
br i1 %38, label %39, label %42
39: ; preds = %32, %25, %18
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %42
42: ; preds = %39, %32
br label %43
43: ; preds = %42
%44 = load i32, i32* %2
%45 = add nsw i32 %44, 1
store i32 %45, i32* %2
br label %13
46: ; preds = %13
%47 = load i32, i32* %3
%48 = icmp sgt i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %53
51: ; preds = %46
%52 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %53
53: ; preds = %51, %49
store i32 0, i32* %3
br label %6
54: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@str = [3 x i8] c"NO\00"
@str.4 = [4 x i8] c"YES\00"
define void @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%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 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %35, label %9
9: ; preds = %0, %29
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%11 = call i32 @strlen(i8* %4)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %9, %20
%14 = phi i64 [ %22, %20 ], [ 0, %9 ]
%15 = phi i32 [ %21, %20 ], [ 0, %9 ]
%16 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %14
%17 = load i8, i8* %16
switch i8 %17, label %20 [
i8 68, label %18
i8 48, label %18
i8 106, label %18
]
18: ; preds = %13, %13, %13
%19 = add nsw i32 %15, 1
br label %20
20: ; preds = %13, %18
%21 = phi i32 [ %19, %18 ], [ %15, %13 ]
%22 = add nuw nsw i64 %14, 1
%23 = call i32 @strlen(i8* %4)
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %22, %24
br i1 %25, label %13, label %26
26: ; preds = %20
%27 = icmp sgt i32 %21, 0
br i1 %27, label %29, label %28
28: ; preds = %9, %26
br label %29
29: ; preds = %26, %28
%30 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %28 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), %26 ]
%31 = call i32 @puts(i8* dereferenceable(1) %30)
%32 = load i32, i32* %1
%33 = add nsw i32 %32, -1
store i32 %33, i32* %1
%34 = icmp eq i32 %32, 0
br i1 %34, label %35, label %9
35: ; preds = %29, %0
ret void
}