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

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

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

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

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

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

b.s = n
c.x = a
c.u = e
c.o = n
e.x = a
e.p = k
e.w = n
e.t = b
a.s = e
a.o = c
a.y = k
a.t = d
k.o = a
k.y = c
k.w = e
j.s = n
d.x = a
d.u = e
d.o = j
n.s = j
assert a.s.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

b.s = n
c.x = a
c.u = e
c.o = n
e.x = a
e.p = k
e.w = n
e.t = b
a.s = e
a.o = c
a.y = k
a.t = d
k.o = a
k.y = c
k.w = e
j.s = n
d.x = a
d.u = e
d.o = j
n.s = j
assert a.s.x.o.txt == "c"