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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.u: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.s: F = None
        self.p: C = None
        self.x: C = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.p: G = None
        self.x: B = None
        self.v: G = None
        self.o: C = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.u: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.s: F = None
        self.p: C = None
        self.x: C = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: C = None
        self.p: G = None
        self.x: B = None
        self.v: G = None
        self.o: C = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

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

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