class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.x: I = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.q: C = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.x: H = None
        self.r: D = None
        self.u: A = None
        self.v: H = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.x: I = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.q: C = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.x: H = None
        self.r: D = None
        self.u: A = None
        self.v: H = None
        self.o: B = None
        self.txt = txt

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

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