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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

f = A("f")
h = B("h")
b = C("b")
l = D("l")
i = E("i")
g = F("g")
j = G("j")
a = C("a")
d = D("d")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

f = A("f")
h = B("h")
b = C("b")
l = D("l")
i = E("i")
g = F("g")
j = G("j")
a = C("a")
d = D("d")
k = F("k")

f.w = b
f.p = l
f.x = g
f.s = h
f.r = h
f.o = j
f.u = d
h.y = j
h.o = j
b.z = f
b.s = l
b.q = l
b.y = i
b.v = g
b.u = h
l.w = j
l.s = f
l.q = f
l.z = h
i.y = b
i.q = f
g.x = a
g.z = i
g.v = k
j.q = i
j.o = f
a.z = f
a.s = l
a.q = l
a.y = i
a.v = g
a.u = h
d.w = j
d.s = f
d.q = f
d.z = h
k.x = a
k.z = i
k.v = g
assert g.v.v.z.q.w.y.q.u.w.o.txt == "f"