class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.y: E = None
        self.t: A = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.z: G = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.p: G = None
        self.o: C = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.txt = txt

l = A("l")
j = B("j")
c = C("c")
n = D("n")
k = E("k")
h = F("h")
d = G("d")
m = H("m")
a = C("a")
e = B("e")

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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.y: E = None
        self.t: A = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.z: G = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.p: G = None
        self.o: C = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.txt = txt

l = A("l")
j = B("j")
c = C("c")
n = D("n")
k = E("k")
h = F("h")
d = G("d")
m = H("m")
a = C("a")
e = B("e")

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