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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

e.w = b
e.v = m
j.p = a
j.s = b
j.y = n
j.o = n
j.q = d
j.w = m
d.t = j
k.y = c
n.t = j
n.z = g
n.o = m
a.q = k
a.x = b
a.y = c
a.o = n
m.v = n
g.w = b
g.v = m
c.y = k
b.w = e
b.v = m
assert c.y.y.y.y.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

e.w = b
e.v = m
j.p = a
j.s = b
j.y = n
j.o = n
j.q = d
j.w = m
d.t = j
k.y = c
n.t = j
n.z = g
n.o = m
a.q = k
a.x = b
a.y = c
a.o = n
m.v = n
g.w = b
g.v = m
c.y = k
b.w = e
b.v = m
assert c.y.y.y.y.y.y.y.y.y.txt == "k"