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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.o: D = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

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

j = A("j")
b = B("b")
i = C("i")
n = D("n")
a = E("a")
e = A("e")
g = B("g")
k = A("k")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.o: D = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

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

j = A("j")
b = B("b")
i = C("i")
n = D("n")
a = E("a")
e = A("e")
g = B("g")
k = A("k")
d = D("d")

j.x = g
j.t = k
j.y = b
j.z = b
b.p = a
b.q = g
b.s = i
i.u = b
i.r = e
i.z = e
i.o = d
i.v = n
n.q = i
n.t = a
a.o = e
a.u = k
e.x = b
e.t = k
e.y = g
e.z = g
g.p = a
g.q = b
g.s = i
k.x = g
k.t = e
k.y = b
k.z = b
d.q = i
d.t = a
assert a.u.t.y.s.txt == "i"