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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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