class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.q: C = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.x: D = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.r: D = None
        self.o: C = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

a = A("a")
k = B("k")
n = C("n")
i = D("i")
j = E("j")
f = F("f")
g = G("g")
d = D("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.x: D = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.r: D = None
        self.o: C = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

a = A("a")
k = B("k")
n = C("n")
i = D("i")
j = E("j")
f = F("f")
g = G("g")
d = D("d")

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