class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: C = None
        self.v: B = None
        self.w: H = None
        self.x: C = None
        self.r: I = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: C = None
        self.v: B = None
        self.w: H = None
        self.x: C = None
        self.r: I = None
        self.o: G = None
        self.txt = txt

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

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