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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

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