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

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.r: D = None
        self.p: E = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.r: D = None
        self.p: E = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.txt = txt

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

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

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