class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.y: G = None
        self.v: C = None
        self.t: C = None
        self.x: G = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.r: E = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.r: E = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

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