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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

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

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

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