class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: D = None
        self.q: J = None
        self.z: G = None
        self.v: D = None
        self.u: D = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.o: G = None
        self.x: F = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: H = None
        self.v: H = None
        self.q: G = None
        self.u: I = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.w: E = None
        self.r: E = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: E = None
        self.o: G = None
        self.x: F = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: H = None
        self.v: H = None
        self.q: G = None
        self.u: I = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: E = None
        self.w: E = None
        self.r: E = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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