class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.w: B = None
        self.v: B = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.z: C = None
        self.y: G = None
        self.q: G = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.w: B = None
        self.v: B = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.z: C = None
        self.y: G = None
        self.q: G = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

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