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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.p: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: E = None
        self.z: A = None
        self.t: D = None
        self.q: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.p: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: E = None
        self.z: A = None
        self.t: D = None
        self.q: B = None
        self.r: E = None
        self.txt = txt

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

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

n.w = i
n.s = e
n.p = e
n.y = b
n.v = b
n.z = j
c.u = e
c.v = i
c.t = i
c.r = b
c.s = j
c.z = n
i.o = j
i.p = j
i.z = f
i.x = b
j.y = i
j.w = i
j.q = f
j.s = f
b.z = j
b.t = f
e.u = n
e.z = n
e.s = b
e.r = b
e.t = j
e.q = c
f.x = c
f.s = e
f.p = e
f.r = n
f.o = b
f.w = j
assert c.r.z.w.o.s.o.z.txt == "j"