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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.z: G = None
        self.q: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.z: G = None
        self.q: C = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

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