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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.w: A = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.w: A = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

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

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

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

c.s = e
c.p = e
c.z = j
c.v = j
h.s = a
h.w = k
h.t = m
k.v = n
k.t = n
k.s = m
k.o = m
k.w = j
a.x = m
a.s = h
a.y = n
b.z = e
l.x = m
l.s = m
l.y = n
j.s = b
j.z = c
j.v = c
j.p = e
e.z = b
n.v = k
n.t = k
n.s = m
n.o = m
n.w = j
m.s = l
m.w = k
m.t = h
assert l.x.s.y.o.t.t.w.t.t.w.txt == "j"