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

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

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

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

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

j = A("j")
l = B("l")
n = C("n")
c = D("c")
m = E("m")
a = A("a")
k = B("k")
g = C("g")

j.z = l
l.o = m
l.t = m
l.s = a
l.p = j
l.r = k
n.x = m
n.q = l
c.w = m
c.y = m
c.p = n
c.x = n
c.q = j
m.w = l
m.t = c
m.s = c
m.v = k
a.z = k
k.o = m
k.t = m
k.s = a
k.p = a
k.r = l
g.x = m
g.q = k
assert k.o.v.o.w.s.z.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
n = C("n")
c = D("c")
m = E("m")
a = A("a")
k = B("k")
g = C("g")

j.z = l
l.o = m
l.t = m
l.s = a
l.p = j
l.r = k
n.x = m
n.q = l
c.w = m
c.y = m
c.p = n
c.x = n
c.q = j
m.w = l
m.t = c
m.s = c
m.v = k
a.z = k
k.o = m
k.t = m
k.s = a
k.p = a
k.r = l
g.x = m
g.q = k
assert k.o.v.o.w.s.z.s.z.txt == "k"