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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: G = None
        self.u: A = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.t: I = None
        self.r: F = None
        self.u: E = None
        self.x: B = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.w: C = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: G = None
        self.u: A = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.t: I = None
        self.r: F = None
        self.u: E = None
        self.x: B = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.w: C = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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

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