class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: D = None
        self.s: C = None
        self.x: G = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.w: E = None
        self.r: A = None
        self.x: A = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.r: G = None
        self.y: G = None
        self.u: G = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

a = A("a")
g = B("g")
n = C("n")
e = D("e")
j = E("j")
m = F("m")
k = G("k")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.w: E = None
        self.r: A = None
        self.x: A = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.r: G = None
        self.y: G = None
        self.u: G = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

a = A("a")
g = B("g")
n = C("n")
e = D("e")
j = E("j")
m = F("m")
k = G("k")

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