class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.z: A = None
        self.u: C = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.x: G = None
        self.s: H = None
        self.q: G = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.r: B = None
        self.v: B = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.o: F = None
        self.v: E = None
        self.w: H = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.z: A = None
        self.u: C = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.x: G = None
        self.s: H = None
        self.q: G = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: H = None
        self.r: B = None
        self.v: B = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.o: F = None
        self.v: E = None
        self.w: H = None
        self.p: B = None
        self.txt = txt

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

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