class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.w: C = None
        self.o: H = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.txt = txt

m = A("m")
d = B("d")
j = C("j")
h = D("h")
g = E("g")
a = F("a")
k = G("k")
l = H("l")

m.t = g
m.z = d
d.v = h
j.o = l
j.z = k
h.x = d
g.p = d
g.o = d
g.r = j
g.u = m
g.t = m
g.y = a
a.p = h
a.t = h
a.u = k
a.w = j
a.x = j
a.o = l
k.x = h
k.q = d
k.y = d
k.z = m
l.y = g
l.v = g
assert m.z.v.x.v.x.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.w: C = None
        self.o: H = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.txt = txt

m = A("m")
d = B("d")
j = C("j")
h = D("h")
g = E("g")
a = F("a")
k = G("k")
l = H("l")

m.t = g
m.z = d
d.v = h
j.o = l
j.z = k
h.x = d
g.p = d
g.o = d
g.r = j
g.u = m
g.t = m
g.y = a
a.p = h
a.t = h
a.u = k
a.w = j
a.x = j
a.o = l
k.x = h
k.q = d
k.y = d
k.z = m
l.y = g
l.v = g
assert m.z.v.x.v.x.v.x.txt == "d"