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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: I = None
        self.u: G = None
        self.p: J = None
        self.s: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: I = None
        self.u: G = None
        self.p: J = None
        self.s: J = None
        self.txt = txt

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

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

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

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

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

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

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

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