class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.z: J = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: I = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: G = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.z: J = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: I = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: G = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

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

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