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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.t: A = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.s: C = None
        self.q: A = None
        self.t: H = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.v: E = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.t: A = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.s: C = None
        self.q: A = None
        self.t: H = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.v: E = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

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