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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.o: C = None
        self.t: G = None
        self.w: F = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.o: C = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.y: B = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.o: C = None
        self.t: G = None
        self.w: F = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.o: C = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.y: B = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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