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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.u: F = None
        self.s: G = None
        self.o: C = None
        self.z: A = None
        self.p: F = None
        self.q: J = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: D = None
        self.x: H = None
        self.u: D = None
        self.y: E = None
        self.s: A = None
        self.t: G = None
        self.p: I = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.u: F = None
        self.s: G = None
        self.o: C = None
        self.z: A = None
        self.p: F = None
        self.q: J = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: D = None
        self.x: H = None
        self.u: D = None
        self.y: E = None
        self.s: A = None
        self.t: G = None
        self.p: I = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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