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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: I = None
        self.p: H = None
        self.x: J = None
        self.r: H = None
        self.y: J = None
        self.w: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.q: D = None
        self.x: C = None
        self.t: I = None
        self.w: C = None
        self.u: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: A = None
        self.q: D = None
        self.s: J = None
        self.t: G = None
        self.v: I = None
        self.w: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: I = None
        self.p: H = None
        self.x: J = None
        self.r: H = None
        self.y: J = None
        self.w: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.q: D = None
        self.x: C = None
        self.t: I = None
        self.w: C = None
        self.u: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: A = None
        self.q: D = None
        self.s: J = None
        self.t: G = None
        self.v: I = None
        self.w: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.txt = txt

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

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