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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.y: E = None
        self.u: E = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

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

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

m = A("m")
g = B("g")
b = C("b")
e = D("e")
a = E("a")
i = F("i")
j = C("j")
f = E("f")
h = D("h")
c = F("c")

m.z = f
g.p = c
g.v = h
b.s = g
b.o = e
b.y = f
b.u = f
b.x = j
e.t = c
e.o = a
e.y = h
e.w = f
a.u = b
a.t = h
a.v = i
a.q = f
i.q = c
j.s = g
j.o = h
j.y = f
j.u = f
j.x = b
f.u = b
f.t = e
f.v = i
f.q = a
h.t = i
h.o = a
h.w = a
h.y = e
c.q = i
assert i.q.q.q.q.q.q.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.y: E = None
        self.u: E = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

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

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

m = A("m")
g = B("g")
b = C("b")
e = D("e")
a = E("a")
i = F("i")
j = C("j")
f = E("f")
h = D("h")
c = F("c")

m.z = f
g.p = c
g.v = h
b.s = g
b.o = e
b.y = f
b.u = f
b.x = j
e.t = c
e.o = a
e.y = h
e.w = f
a.u = b
a.t = h
a.v = i
a.q = f
i.q = c
j.s = g
j.o = h
j.y = f
j.u = f
j.x = b
f.u = b
f.t = e
f.v = i
f.q = a
h.t = i
h.o = a
h.w = a
h.y = e
c.q = i
assert i.q.q.q.q.q.q.q.q.txt == "i"