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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.t: E = None
        self.w: B = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.v: D = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.w: C = None
        self.u: F = None
        self.p: A = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.s: I = None
        self.p: B = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.t: E = None
        self.w: B = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.v: D = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.w: C = None
        self.u: F = None
        self.p: A = None
        self.v: A = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.s: I = None
        self.p: B = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

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