class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.w: G = None
        self.r: C = None
        self.t: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.s: I = None
        self.x: A = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

d.y = k
d.o = i
d.w = b
d.r = f
d.t = m
i.v = e
i.z = b
f.x = h
f.t = i
n.r = f
n.q = l
n.y = b
h.q = i
h.o = d
h.s = m
h.x = k
h.t = k
h.p = n
e.z = b
b.y = f
b.t = l
b.p = n
b.w = d
l.t = n
m.s = b
m.r = i
m.o = i
m.x = l
m.p = l
m.q = l
m.v = e
k.y = d
k.o = i
k.w = b
k.r = f
k.t = m
assert n.y.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.w: G = None
        self.r: C = None
        self.t: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.s: I = None
        self.x: A = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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