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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.r: G = None
        self.s: E = None
        self.v: G = None
        self.z: B = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.t: C = None
        self.q: H = None
        self.u: C = None
        self.p: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

a = A("a")
b = B("b")
h = C("h")
e = D("e")
i = E("i")
c = F("c")
n = G("n")
k = H("k")
f = E("f")

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.r: G = None
        self.s: E = None
        self.v: G = None
        self.z: B = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.t: C = None
        self.q: H = None
        self.u: C = None
        self.p: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

a = A("a")
b = B("b")
h = C("h")
e = D("e")
i = E("i")
c = F("c")
n = G("n")
k = H("k")
f = E("f")

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