class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: E = None
        self.w: H = None
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.v: A = None
        self.z: I = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.o: E = None
        self.w: B = None
        self.s: C = None
        self.u: J = 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: J = None
        self.u: G = None
        self.q: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.v: A = None
        self.z: I = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.o: E = None
        self.w: B = None
        self.s: C = None
        self.u: J = 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: J = None
        self.u: G = None
        self.q: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

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

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