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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.x: A = None
        self.s: C = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.q: F = None
        self.u: G = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.u: H = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.v: D = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.x: A = None
        self.s: C = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: A = None
        self.q: F = None
        self.u: G = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.u: H = None
        self.r: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.v: D = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

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

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