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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: H = None
        self.t: A = None
        self.s: F = None
        self.z: F = None
        self.r: G = 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.s: H = None
        self.z: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: B = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: H = None
        self.t: A = None
        self.s: F = None
        self.z: F = None
        self.r: G = 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.s: H = None
        self.z: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: B = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

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

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