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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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