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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: C = None
        self.t: I = None
        self.u: H = None
        self.y: J = None
        self.w: H = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.y: E = None
        self.p: B = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.u: G = None
        self.v: F = None
        self.r: C = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: C = None
        self.t: I = None
        self.u: H = None
        self.y: J = None
        self.w: H = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.y: E = None
        self.p: B = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.u: G = None
        self.v: F = None
        self.r: C = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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

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