class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.u: C = None
        self.t: F = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: F = None
        self.y: H = None
        self.x: D = None
        self.t: G = None
        self.q: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.r: D = None
        self.w: E = None
        self.s: H = None
        self.t: H = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.z: A = None
        self.x: E = None
        self.t: E = None
        self.r: E = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

j = A("j")
b = B("b")
m = C("m")
h = D("h")
e = E("e")
i = F("i")
k = G("k")
f = H("f")

j.r = f
j.s = f
j.q = b
j.u = m
j.t = i
j.y = k
b.z = k
b.t = k
b.q = k
b.s = i
b.y = f
b.u = f
b.x = h
b.p = h
m.v = f
m.s = f
m.t = f
m.q = j
m.r = h
m.w = e
m.p = b
m.x = b
h.r = e
e.z = i
e.o = h
i.q = m
i.w = m
i.z = j
i.x = e
i.t = e
i.r = e
i.u = e
i.o = h
k.x = f
k.t = f
k.z = e
f.p = h
assert k.z.o.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.u: C = None
        self.t: F = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: F = None
        self.y: H = None
        self.x: D = None
        self.t: G = None
        self.q: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.r: D = None
        self.w: E = None
        self.s: H = None
        self.t: H = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.z: A = None
        self.x: E = None
        self.t: E = None
        self.r: E = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

j = A("j")
b = B("b")
m = C("m")
h = D("h")
e = E("e")
i = F("i")
k = G("k")
f = H("f")

j.r = f
j.s = f
j.q = b
j.u = m
j.t = i
j.y = k
b.z = k
b.t = k
b.q = k
b.s = i
b.y = f
b.u = f
b.x = h
b.p = h
m.v = f
m.s = f
m.t = f
m.q = j
m.r = h
m.w = e
m.p = b
m.x = b
h.r = e
e.z = i
e.o = h
i.q = m
i.w = m
i.z = j
i.x = e
i.t = e
i.r = e
i.u = e
i.o = h
k.x = f
k.t = f
k.z = e
f.p = h
assert k.z.o.r.z.txt == "i"