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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.q: H = None
        self.w: H = None
        self.p: F = None
        self.z: A = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: G = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.q: H = None
        self.w: H = None
        self.p: F = None
        self.z: A = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: G = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

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

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