class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.p: F = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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