class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: D = None
        self.u: D = None
        self.r: J = None
        self.q: I = None
        self.s: D = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.y: J = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.y: J = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

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

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