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

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

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

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

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

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

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

k.x = n
k.y = d
i.v = d
i.w = j
i.p = k
i.u = k
i.o = n
i.r = c
c.v = i
c.u = m
c.y = j
d.v = j
d.y = e
n.y = k
e.t = i
e.v = i
j.y = k
a.v = n
a.y = e
m.v = i
m.u = c
m.y = n
assert e.v.v.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

k.x = n
k.y = d
i.v = d
i.w = j
i.p = k
i.u = k
i.o = n
i.r = c
c.v = i
c.u = m
c.y = j
d.v = j
d.y = e
n.y = k
e.t = i
e.v = i
j.y = k
a.v = n
a.y = e
m.v = i
m.u = c
m.y = n
assert e.v.v.v.y.txt == "k"