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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: C = None
        self.s: F = None
        self.p: D = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: C = None
        self.s: F = None
        self.p: D = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

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

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