class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

k.r = d
k.u = d
k.q = d
d.v = k
d.s = a
d.q = j
a.p = m
a.t = d
a.x = d
a.q = e
a.u = i
i.t = j
i.p = j
i.y = j
i.v = d
i.w = d
j.r = k
n.t = j
n.p = j
n.y = j
n.v = d
n.w = d
e.t = j
e.p = j
e.y = j
e.v = d
e.w = d
m.r = d
m.u = d
m.q = d
assert j.r.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

k.r = d
k.u = d
k.q = d
d.v = k
d.s = a
d.q = j
a.p = m
a.t = d
a.x = d
a.q = e
a.u = i
i.t = j
i.p = j
i.y = j
i.v = d
i.w = d
j.r = k
n.t = j
n.p = j
n.y = j
n.v = d
n.w = d
e.t = j
e.p = j
e.y = j
e.v = d
e.w = d
m.r = d
m.u = d
m.q = d
assert j.r.u.s.txt == "a"