class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: I = None
        self.z: E = None
        self.y: C = None
        self.v: A = None
        self.t: I = None
        self.w: A = None
        self.s: G = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: I = None
        self.z: E = None
        self.y: C = None
        self.v: A = None
        self.t: I = None
        self.w: A = None
        self.s: G = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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