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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

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

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

k.s = i
k.x = i
n.p = b
n.v = m
n.t = k
n.o = k
d.r = b
d.x = b
d.t = m
i.o = b
i.u = b
i.q = b
i.s = k
b.r = n
b.v = k
b.s = k
b.z = c
c.r = b
c.x = b
c.t = m
m.p = b
m.v = n
m.t = k
m.o = k
j.o = b
j.u = b
j.q = b
j.s = k
assert c.x.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

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

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

k.s = i
k.x = i
n.p = b
n.v = m
n.t = k
n.o = k
d.r = b
d.x = b
d.t = m
i.o = b
i.u = b
i.q = b
i.s = k
b.r = n
b.v = k
b.s = k
b.z = c
c.r = b
c.x = b
c.t = m
m.p = b
m.v = n
m.t = k
m.o = k
j.o = b
j.u = b
j.q = b
j.s = k
assert c.x.z.t.txt == "m"