class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: I = None
        self.w: D = None
        self.o: I = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.o: F = None
        self.v: A = None
        self.t: A = None
        self.q: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.r: J = None
        self.z: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.o: F = None
        self.v: A = None
        self.t: A = None
        self.q: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.r: J = None
        self.z: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

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

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