class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: I = None
        self.p: I = None
        self.q: J = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: B = None
        self.w: B = None
        self.s: G = None
        self.y: B = None
        self.x: B = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: A = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.v: D = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.y: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: B = None
        self.w: B = None
        self.s: G = None
        self.y: B = None
        self.x: B = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: A = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.v: D = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.y: A = None
        self.o: C = None
        self.txt = txt

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

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