class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.y: F = None
        self.t: B = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
d = C("d")
n = D("n")
c = E("c")
m = F("m")
k = G("k")
a = B("a")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.y: F = None
        self.t: B = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
d = C("d")
n = D("n")
c = E("c")
m = F("m")
k = G("k")
a = B("a")
l = G("l")

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