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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: F = None
        self.u: B = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
k = B("k")
b = C("b")
e = D("e")
f = E("f")
j = F("j")
i = E("i")
d = F("d")
m = C("m")

g.y = e
g.t = f
k.z = b
k.y = b
k.q = g
k.u = m
k.p = d
b.p = e
e.v = k
e.p = k
e.s = f
e.r = b
e.w = d
f.p = e
f.v = j
f.u = k
f.y = d
f.x = b
j.w = d
i.p = e
i.v = d
i.u = k
i.y = j
i.x = b
d.w = j
m.p = e
assert e.w.w.w.w.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: F = None
        self.u: B = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
k = B("k")
b = C("b")
e = D("e")
f = E("f")
j = F("j")
i = E("i")
d = F("d")
m = C("m")

g.y = e
g.t = f
k.z = b
k.y = b
k.q = g
k.u = m
k.p = d
b.p = e
e.v = k
e.p = k
e.s = f
e.r = b
e.w = d
f.p = e
f.v = j
f.u = k
f.y = d
f.x = b
j.w = d
i.p = e
i.v = d
i.u = k
i.y = j
i.x = b
d.w = j
m.p = e
assert e.w.w.w.w.w.w.w.w.txt == "j"