class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: C = None
        self.t: J = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.r: F = None
        self.q: G = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.x: B = None
        self.w: D = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: J = None
        self.t: A = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: J = None
        self.q: F = None
        self.s: F = None
        self.t: A = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.r: F = None
        self.x: C = None
        self.q: A = None
        self.w: I = None
        self.y: E = None
        self.p: E = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.r: F = None
        self.q: G = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.x: B = None
        self.w: D = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: J = None
        self.t: A = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: J = None
        self.q: F = None
        self.s: F = None
        self.t: A = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.r: F = None
        self.x: C = None
        self.q: A = None
        self.w: I = None
        self.y: E = None
        self.p: E = None
        self.s: F = None
        self.txt = txt

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

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