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

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

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

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

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

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

a.s = b
a.p = c
n.q = j
n.u = j
n.r = a
n.s = a
b.x = k
b.v = m
b.t = a
e.x = n
e.u = b
e.w = f
e.p = j
j.y = a
j.x = f
j.o = h
j.q = m
j.p = n
m.x = k
m.v = b
m.t = a
c.x = n
c.u = b
c.w = f
c.p = k
h.x = n
h.u = b
h.w = k
h.p = f
f.y = a
f.x = j
f.o = c
f.q = b
f.p = n
k.y = a
k.x = f
k.o = h
k.q = m
k.p = n
assert j.q.x.q.t.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

a.s = b
a.p = c
n.q = j
n.u = j
n.r = a
n.s = a
b.x = k
b.v = m
b.t = a
e.x = n
e.u = b
e.w = f
e.p = j
j.y = a
j.x = f
j.o = h
j.q = m
j.p = n
m.x = k
m.v = b
m.t = a
c.x = n
c.u = b
c.w = f
c.p = k
h.x = n
h.u = b
h.w = k
h.p = f
f.y = a
f.x = j
f.o = c
f.q = b
f.p = n
k.y = a
k.x = f
k.o = h
k.q = m
k.p = n
assert j.q.x.q.t.s.t.txt == "a"