class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.w: D = None
        self.z: E = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.p: B = None
        self.s: A = None
        self.u: A = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

n = A("n")
b = B("b")
c = C("c")
e = D("e")
k = E("k")
a = F("a")
m = G("m")
l = H("l")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.p: B = None
        self.s: A = None
        self.u: A = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

n = A("n")
b = B("b")
c = C("c")
e = D("e")
k = E("k")
a = F("a")
m = G("m")
l = H("l")
d = H("d")

n.x = e
n.w = e
n.u = k
n.z = k
n.v = c
n.y = b
b.p = k
b.z = k
b.w = m
b.u = a
c.q = a
c.v = n
c.r = k
c.w = e
e.y = k
k.w = c
k.z = e
a.z = n
a.u = n
a.v = m
m.q = e
m.y = b
m.w = a
l.t = e
l.w = e
l.v = m
l.p = b
l.s = n
l.u = n
l.x = k
d.t = e
d.w = e
d.v = m
d.p = b
d.s = n
d.u = n
d.x = k
assert k.w.w.y.z.y.z.y.txt == "k"