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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.v: G = None
        self.q: E = None
        self.z: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

k.o = g
k.y = f
g.p = e
g.r = e
g.v = d
g.q = i
g.z = f
g.s = k
l.y = i
l.x = d
f.w = c
f.q = c
f.x = i
i.y = k
i.w = k
i.x = f
i.p = g
c.w = k
c.t = l
d.v = f
e.v = k
e.o = k
e.w = i
h.y = d
h.s = l
h.q = i
assert e.v.o.z.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.v: G = None
        self.q: E = None
        self.z: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

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