class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.r: C = None
        self.y: C = None
        self.q: D = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.q: A = None
        self.u: A = None
        self.y: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.p: F = None
        self.u: B = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.q: A = None
        self.u: A = None
        self.y: F = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.p: F = None
        self.u: B = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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