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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.t: E = None
        self.s: B = None
        self.y: A = None
        self.x: A = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.t: E = None
        self.s: B = None
        self.y: A = None
        self.x: A = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.txt = txt

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

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