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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.s: F = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: F = None
        self.t: C = None
        self.x: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: D = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.s: F = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: B = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: F = None
        self.t: C = None
        self.x: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: D = None
        self.w: I = None
        self.txt = txt

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

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

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