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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: A = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

m = A("m")
j = B("j")
g = C("g")
l = D("l")
a = E("a")
f = F("f")
k = G("k")
n = H("n")
e = A("e")
i = E("i")

m.t = j
m.s = j
m.z = l
m.p = l
m.r = k
j.u = i
j.t = k
j.o = g
g.w = k
g.o = n
g.p = i
l.y = g
a.q = g
a.o = g
a.y = m
a.t = m
f.q = k
f.v = k
f.t = l
k.y = f
k.q = g
n.p = k
n.o = a
n.q = m
e.t = j
e.s = j
e.z = l
e.p = l
e.r = k
i.q = g
i.o = g
i.y = e
i.t = e
assert f.v.y.q.y.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.r: G = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: A = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

m = A("m")
j = B("j")
g = C("g")
l = D("l")
a = E("a")
f = F("f")
k = G("k")
n = H("n")
e = A("e")
i = E("i")

m.t = j
m.s = j
m.z = l
m.p = l
m.r = k
j.u = i
j.t = k
j.o = g
g.w = k
g.o = n
g.p = i
l.y = g
a.q = g
a.o = g
a.y = m
a.t = m
f.q = k
f.v = k
f.t = l
k.y = f
k.q = g
n.p = k
n.o = a
n.q = m
e.t = j
e.s = j
e.z = l
e.p = l
e.r = k
i.q = g
i.o = g
i.y = e
i.t = e
assert f.v.y.q.y.q.y.txt == "f"