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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.s: D = None
        self.y: B = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.s: D = None
        self.y: B = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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