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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.v: D = None
        self.x: F = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: B = None
        self.u: A = None
        self.x: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.v: D = None
        self.x: F = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: B = None
        self.u: A = None
        self.x: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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