class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.u: I = None
        self.v: F = None
        self.p: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.u: A = None
        self.txt = txt

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

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