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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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