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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: D = None
        self.x: C = None
        self.t: D = None
        self.p: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.x: D = None
        self.v: E = None
        self.q: I = None
        self.w: H = None
        self.r: H = None
        self.y: B = None
        self.u: A = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.w: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: D = None
        self.x: C = None
        self.t: D = None
        self.p: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.x: D = None
        self.v: E = None
        self.q: I = None
        self.w: H = None
        self.r: H = None
        self.y: B = None
        self.u: A = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.w: I = None
        self.txt = txt

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

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