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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.x: E = None
        self.o: D = None
        self.w: G = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.x: E = None
        self.o: D = None
        self.w: G = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

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

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