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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.w: G = None
        self.t: G = None
        self.p: C = None
        self.x: I = None
        self.v: I = None
        self.o: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.v: I = None
        self.x: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.o: C = None
        self.w: A = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: C = None
        self.q: F = None
        self.o: E = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.p: A = None
        self.w: F = None
        self.x: G = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.w: G = None
        self.t: G = None
        self.p: C = None
        self.x: I = None
        self.v: I = None
        self.o: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.v: I = None
        self.x: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.o: C = None
        self.w: A = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: C = None
        self.q: F = None
        self.o: E = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.p: A = None
        self.w: F = None
        self.x: G = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

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

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

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