class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.w: F = None
        self.t: E = None
        self.q: D = None
        self.u: I = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.x: C = None
        self.s: B = None
        self.v: F = None
        self.t: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.x: C = None
        self.s: B = None
        self.v: F = None
        self.t: B = None
        self.q: G = None
        self.txt = txt

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

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

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