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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.s: B = None
        self.u: C = None
        self.w: G = None
        self.t: B = None
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.s: B = None
        self.u: C = None
        self.w: G = None
        self.t: B = None
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

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