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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.t: G = None
        self.v: G = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.r: C = None
        self.o: C = None
        self.x: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.t: G = None
        self.v: G = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.r: C = None
        self.o: C = None
        self.x: B = None
        self.p: G = None
        self.txt = txt

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

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

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

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