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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.u: F = None
        self.s: C = None
        self.w: F = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.w: D = None
        self.z: B = None
        self.q: D = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.u: F = None
        self.s: C = None
        self.w: F = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.w: D = None
        self.z: B = None
        self.q: D = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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