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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: D = None
        self.v: I = None
        self.u: I = None
        self.w: B = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: G = None
        self.v: A = None
        self.y: C = None
        self.p: I = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: D = None
        self.v: I = None
        self.u: I = None
        self.w: B = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: G = None
        self.v: A = None
        self.y: C = None
        self.p: I = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

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

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