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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.w: I = None
        self.v: G = None
        self.p: D = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.w: F = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: G = None
        self.t: H = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.w: I = None
        self.v: G = None
        self.p: D = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.w: F = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: G = None
        self.t: H = None
        self.p: B = None
        self.txt = txt

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

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

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