class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: F = None
        self.o: E = None
        self.p: D = None
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.y: E = None
        self.r: E = None
        self.s: D = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.o: B = None
        self.q: A = None
        self.txt = txt

j = A("j")
m = B("m")
b = C("b")
k = D("k")
n = E("n")
d = F("d")
i = G("i")
l = H("l")
c = H("c")

j.u = l
j.y = d
j.q = d
j.o = n
j.p = k
j.t = k
j.v = b
j.x = b
m.t = d
b.y = d
b.q = i
k.r = c
n.p = k
n.o = i
n.z = b
d.v = m
d.p = n
d.y = n
d.r = n
d.t = n
d.s = k
d.z = j
i.v = d
l.p = m
l.o = m
l.w = k
l.q = j
c.p = m
c.o = m
c.w = k
c.q = j
assert i.v.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: F = None
        self.o: E = None
        self.p: D = None
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.y: E = None
        self.r: E = None
        self.s: D = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.o: B = None
        self.q: A = None
        self.txt = txt

j = A("j")
m = B("m")
b = C("b")
k = D("k")
n = E("n")
d = F("d")
i = G("i")
l = H("l")
c = H("c")

j.u = l
j.y = d
j.q = d
j.o = n
j.p = k
j.t = k
j.v = b
j.x = b
m.t = d
b.y = d
b.q = i
k.r = c
n.p = k
n.o = i
n.z = b
d.v = m
d.p = n
d.y = n
d.r = n
d.t = n
d.s = k
d.z = j
i.v = d
l.p = m
l.o = m
l.w = k
l.q = j
c.p = m
c.o = m
c.w = k
c.q = j
assert i.v.y.z.txt == "b"