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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

i = A("i")
g = B("g")
c = C("c")
e = C("e")
m = C("m")
n = B("n")
f = C("f")
d = B("d")
j = B("j")

i.z = d
i.t = d
i.w = d
g.z = e
c.v = g
c.q = g
c.y = i
e.v = n
e.q = j
e.y = i
m.v = d
m.q = j
m.y = i
n.z = c
f.v = n
f.q = g
f.y = i
d.z = e
j.z = f
assert d.z.q.z.y.z.z.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

i = A("i")
g = B("g")
c = C("c")
e = C("e")
m = C("m")
n = B("n")
f = C("f")
d = B("d")
j = B("j")

i.z = d
i.t = d
i.w = d
g.z = e
c.v = g
c.q = g
c.y = i
e.v = n
e.q = j
e.y = i
m.v = d
m.q = j
m.y = i
n.z = c
f.v = n
f.q = g
f.y = i
d.z = e
j.z = f
assert d.z.q.z.y.z.z.y.t.txt == "d"