class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: C = None
        self.z: I = None
        self.w: H = None
        self.t: I = None
        self.v: D = None
        self.q: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: J = None
        self.r: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: C = None
        self.z: I = None
        self.w: H = None
        self.t: I = None
        self.v: D = None
        self.q: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: J = None
        self.r: F = None
        self.s: A = None
        self.txt = txt

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

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

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