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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: I = None
        self.s: J = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.w: G = None
        self.q: I = None
        self.x: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: H = None
        self.r: J = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.o: E = None
        self.z: A = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.t: G = None
        self.r: I = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: I = None
        self.s: J = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.w: G = None
        self.q: I = None
        self.x: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: H = None
        self.r: J = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.o: E = None
        self.z: A = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.t: G = None
        self.r: I = None
        self.v: H = None
        self.txt = txt

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

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