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

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

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

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

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

b = A("b")
g = B("g")
k = C("k")
i = D("i")
n = E("n")
m = B("m")
c = A("c")
f = D("f")

b.u = m
b.x = m
b.r = f
b.s = k
b.o = k
g.x = f
g.w = n
g.s = n
g.u = k
k.s = n
k.z = n
i.z = n
n.u = k
n.y = f
n.r = b
n.s = i
n.t = i
m.x = f
m.w = n
m.s = n
m.u = k
c.u = g
c.r = f
c.s = k
c.o = k
c.x = m
f.z = n
assert k.z.u.z.r.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.s: C = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

b = A("b")
g = B("g")
k = C("k")
i = D("i")
n = E("n")
m = B("m")
c = A("c")
f = D("f")

b.u = m
b.x = m
b.r = f
b.s = k
b.o = k
g.x = f
g.w = n
g.s = n
g.u = k
k.s = n
k.z = n
i.z = n
n.u = k
n.y = f
n.r = b
n.s = i
n.t = i
m.x = f
m.w = n
m.s = n
m.u = k
c.u = g
c.r = f
c.s = k
c.o = k
c.x = m
f.z = n
assert k.z.u.z.r.s.z.txt == "n"