class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.z: D = None
        self.y: G = None
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

a.o = h
a.v = n
a.y = n
a.u = n
a.z = l
a.w = l
h.v = f
h.r = d
h.x = d
h.t = k
b.u = n
l.v = b
l.o = k
l.z = k
f.p = a
f.u = k
f.x = e
f.w = l
e.t = l
e.v = f
e.x = h
n.s = k
n.z = e
d.t = k
d.y = f
d.s = e
k.u = e
k.z = n
assert e.v.u.u.x.x.s.x.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.z: D = None
        self.y: G = None
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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