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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.w: H = None
        self.u: H = None
        self.r: J = None
        self.o: J = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.v: J = None
        self.w: C = None
        self.z: H = None
        self.s: D = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: F = None
        self.t: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.w: H = None
        self.u: H = None
        self.r: J = None
        self.o: J = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.v: J = None
        self.w: C = None
        self.z: H = None
        self.s: D = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.v: F = None
        self.t: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.s: G = None
        self.txt = txt

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

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

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