import java.util.*;
import java.lang.*;
import java.io.*;
class L1Exception
extends Exception { public L1Exception
(Throwable cause
) { super(cause
); } } class L2Exception
extends Exception { public L2Exception
(Throwable cause
) { super(cause
); } } class L3Exception
extends Exception { public L3Exception
(Throwable cause
) { super(cause
); } } class L4Exception
extends Exception { public L4Exception
(Throwable cause
) { super(cause
); } } class L5Exception
extends Exception { public L5Exception
(Throwable cause
) { super(cause
); } }
class CheckedExceptions {
static void doSomethingL5(int x) throws L5Exception {
try {
doSomethingL4(x * 3 + 0);
doSomethingL4(x * 3 + 1);
doSomethingL4(x * 3 + 2);
} catch (L4Exception e) {
throw new L5Exception(e);
}
}
static void doSomethingL4(int x) throws L4Exception {
try {
doSomethingL3(x * 3 + 0);
doSomethingL3(x * 3 + 1);
doSomethingL3(x * 3 + 2);
} catch (L3Exception e) {
throw new L4Exception(e);
}
}
static void doSomethingL3(int x) throws L3Exception {
try {
doSomethingL2(x * 3 + 0);
doSomethingL2(x * 3 + 1);
doSomethingL2(x * 3 + 2);
} catch (L2Exception e) {
throw new L3Exception(e);
}
}
static void doSomethingL2(int x) throws L2Exception {
try {
doSomethingL1(x * 3 + 0);
doSomethingL1(x * 3 + 1);
doSomethingL1(x * 3 + 2);
} catch (L1Exception e) {
throw new L2Exception(e);
}
}
static void doSomethingL1(int x) throws L1Exception {
if (x == 42) {
throw new L1Exception(null);
}
}
doSomethingL5(0);
}
}