class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.t: D = None
        self.v: B = None
        self.u: D = None
        self.x: G = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.y: C = None
        self.o: D = None
        self.r: A = None
        self.u: C = None
        self.q: C = None
        self.txt = txt

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

n = A("n")
a = B("a")
i = C("i")
g = D("g")
h = E("h")
c = F("c")
f = G("f")
e = A("e")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.y: C = None
        self.o: D = None
        self.r: A = None
        self.u: C = None
        self.q: C = None
        self.txt = txt

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

n = A("n")
a = B("a")
i = C("i")
g = D("g")
h = E("h")
c = F("c")
f = G("f")
e = A("e")

n.q = i
n.y = i
n.t = g
n.u = g
n.v = a
n.x = f
n.p = c
a.p = g
i.t = a
i.y = c
i.p = h
g.u = i
g.w = h
h.v = i
h.w = a
h.t = a
h.r = f
h.z = c
c.z = a
c.p = i
c.y = i
c.u = i
c.q = i
c.o = g
c.r = n
f.x = a
f.p = a
f.z = c
f.t = c
e.q = i
e.y = i
e.t = g
e.u = g
e.v = a
e.x = f
e.p = c
assert a.p.w.v.txt == "i"