class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.v: A = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

c = A("c")
f = B("f")
d = C("d")
e = D("e")
b = E("b")
l = B("l")
j = B("j")
g = E("g")

c.u = j
c.t = b
c.s = d
f.r = j
f.p = e
f.z = c
f.t = d
d.w = e
d.t = c
e.t = j
e.z = g
b.o = j
b.p = d
b.t = d
b.v = c
b.x = c
l.r = f
l.p = e
l.z = c
l.t = d
j.r = f
j.p = e
j.z = c
j.t = d
g.o = f
g.p = d
g.t = d
g.v = c
g.x = c
assert j.z.u.p.t.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.v: A = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

c = A("c")
f = B("f")
d = C("d")
e = D("e")
b = E("b")
l = B("l")
j = B("j")
g = E("g")

c.u = j
c.t = b
c.s = d
f.r = j
f.p = e
f.z = c
f.t = d
d.w = e
d.t = c
e.t = j
e.z = g
b.o = j
b.p = d
b.t = d
b.v = c
b.x = c
l.r = f
l.p = e
l.z = c
l.t = d
j.r = f
j.p = e
j.z = c
j.t = d
g.o = f
g.p = d
g.t = d
g.v = c
g.x = c
assert j.z.u.p.t.z.u.txt == "j"