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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.v: G = None
        self.y: H = None
        self.u: A = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: J = None
        self.s: D = None
        self.x: D = None
        self.o: H = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.v: G = None
        self.y: H = None
        self.u: A = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: J = None
        self.s: D = None
        self.x: D = None
        self.o: H = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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