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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.u: F = None
        self.s: F = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

e = A("e")
k = B("k")
c = C("c")
l = D("l")
f = E("f")
i = F("i")
n = F("n")

e.x = c
e.t = f
e.p = l
k.t = c
k.w = c
k.v = c
k.u = i
k.s = i
k.y = f
c.v = e
c.u = f
c.w = f
c.t = f
c.y = k
l.u = n
l.y = n
l.q = f
l.p = c
f.w = e
f.x = k
f.y = i
i.t = e
i.u = e
i.w = n
n.t = e
n.u = e
n.w = i
assert i.w.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.u: F = None
        self.s: F = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

e = A("e")
k = B("k")
c = C("c")
l = D("l")
f = E("f")
i = F("i")
n = F("n")

e.x = c
e.t = f
e.p = l
k.t = c
k.w = c
k.v = c
k.u = i
k.s = i
k.y = f
c.v = e
c.u = f
c.w = f
c.t = f
c.y = k
l.u = n
l.y = n
l.q = f
l.p = c
f.w = e
f.x = k
f.y = i
i.t = e
i.u = e
i.w = n
n.t = e
n.u = e
n.w = i
assert i.w.w.w.w.w.txt == "n"