class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: D = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: D = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

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

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