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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.u: F = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.w: A = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.u: E = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.u: F = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: A = None
        self.w: A = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.u: E = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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