class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: D = None
        self.r: D = None
        self.z: G = None
        self.p: D = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: D = None
        self.r: D = None
        self.z: G = None
        self.p: D = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

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

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

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