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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.s: A = None
        self.u: H = None
        self.o: G = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.s: A = None
        self.u: H = None
        self.o: G = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

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