class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: H = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: H = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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