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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
g = D("g")
f = E("f")
e = F("e")
j = G("j")

n.z = b
n.p = g
n.u = f
n.s = j
h.y = g
b.s = e
b.v = h
b.u = h
b.q = h
b.w = f
g.t = b
g.x = e
g.s = e
g.p = n
f.t = g
e.s = b
e.v = f
j.w = h
j.v = h
j.p = n
j.z = e
j.x = b
assert e.v.t.p.z.s.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
g = D("g")
f = E("f")
e = F("e")
j = G("j")

n.z = b
n.p = g
n.u = f
n.s = j
h.y = g
b.s = e
b.v = h
b.u = h
b.q = h
b.w = f
g.t = b
g.x = e
g.s = e
g.p = n
f.t = g
e.s = b
e.v = f
j.w = h
j.v = h
j.p = n
j.z = e
j.x = b
assert e.v.t.p.z.s.s.v.txt == "h"