class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.s: H = None
        self.w: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.t: D = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.s: H = None
        self.w: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.t: D = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

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

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

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