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

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

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

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

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

b = A("b")
k = B("k")
n = C("n")
a = D("a")
i = E("i")
m = A("m")
j = B("j")

b.o = a
b.x = i
b.s = i
k.w = n
k.v = i
k.t = j
k.y = a
k.o = b
n.z = k
n.y = k
n.o = i
a.u = i
a.z = b
i.o = n
i.s = n
i.w = a
i.x = a
i.r = k
m.o = a
m.x = i
m.s = i
j.w = n
j.v = i
j.t = k
j.y = a
j.o = b
assert m.o.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

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

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

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

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

b = A("b")
k = B("k")
n = C("n")
a = D("a")
i = E("i")
m = A("m")
j = B("j")

b.o = a
b.x = i
b.s = i
k.w = n
k.v = i
k.t = j
k.y = a
k.o = b
n.z = k
n.y = k
n.o = i
a.u = i
a.z = b
i.o = n
i.s = n
i.w = a
i.x = a
i.r = k
m.o = a
m.x = i
m.s = i
j.w = n
j.v = i
j.t = k
j.y = a
j.o = b
assert m.o.u.r.txt == "k"