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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.x: I = None
        self.y: D = None
        self.v: E = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.y: B = None
        self.z: I = None
        self.q: D = None
        self.o: C = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.x: I = None
        self.y: D = None
        self.v: E = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.y: B = None
        self.z: I = None
        self.q: D = None
        self.o: C = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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