class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.z: G = None
        self.q: G = None
        self.s: A = 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.t: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.z: G = None
        self.q: G = None
        self.s: A = 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.t: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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

c.t = k
c.p = k
g.r = i
g.t = j
g.z = e
g.q = e
g.s = c
j.v = n
n.t = k
n.z = g
a.u = j
a.s = e
i.z = c
e.r = k
e.w = j
e.y = n
k.t = c
k.p = c
assert k.p.p.p.p.p.t.p.t.txt == "k"