class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: B = None
        self.y: B = None
        self.o: C = None
        self.u: E = None
        self.w: B = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.s: A = None
        self.v: G = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.q: C = None
        self.u: H = None
        self.v: H = None
        self.y: H = None
        self.r: C = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.o: D = None
        self.y: G = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.q: C = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: F = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

n = A("n")
h = B("h")
e = C("e")
c = D("c")
l = E("l")
i = F("i")
a = G("a")
f = H("f")
m = I("m")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.s: A = None
        self.v: G = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.q: C = None
        self.u: H = None
        self.v: H = None
        self.y: H = None
        self.r: C = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.o: D = None
        self.y: G = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.q: C = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: F = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

n = A("n")
h = B("h")
e = C("e")
c = D("c")
l = E("l")
i = F("i")
a = G("a")
f = H("f")
m = I("m")
d = J("d")

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