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

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

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

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

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

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

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

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

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

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

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

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

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