class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.o: A = None
        self.s: A = None
        self.t: H = None
        self.p: J = None
        self.u: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.v: J = None
        self.s: C = None
        self.u: J = None
        self.y: D = None
        self.o: B = None
        self.r: H = None
        self.t: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.y: I = None
        self.o: J = None
        self.p: D = None
        self.v: H = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.t: G = None
        self.x: C = None
        self.y: E = None
        self.o: E = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.o: A = None
        self.s: A = None
        self.t: H = None
        self.p: J = None
        self.u: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.v: J = None
        self.s: C = None
        self.u: J = None
        self.y: D = None
        self.o: B = None
        self.r: H = None
        self.t: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.y: I = None
        self.o: J = None
        self.p: D = None
        self.v: H = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.t: G = None
        self.x: C = None
        self.y: E = None
        self.o: E = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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