class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: J = None
        self.u: E = None
        self.r: I = None
        self.y: I = None
        self.v: A = None
        self.q: J = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: J = None
        self.p: E = None
        self.w: J = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: B = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: J = None
        self.u: E = None
        self.r: I = None
        self.y: I = None
        self.v: A = None
        self.q: J = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: J = None
        self.p: E = None
        self.w: J = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: B = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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