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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.txt = txt

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

k = A("k")
a = B("a")
m = C("m")
i = D("i")
g = E("g")
l = F("l")
e = E("e")
c = E("c")
j = B("j")
f = A("f")

k.s = e
k.o = j
k.r = f
k.t = g
a.w = j
a.u = k
a.v = k
a.x = i
a.s = f
a.o = m
m.s = l
i.y = c
i.t = l
i.w = m
i.x = j
i.u = a
i.o = k
g.v = a
g.q = f
l.t = a
e.v = j
e.q = k
c.v = j
c.q = k
j.w = a
j.u = k
j.s = k
j.x = i
j.v = f
j.o = m
f.s = g
f.o = j
f.r = k
f.t = e
assert g.v.x.o.r.t.v.s.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.r: A = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.txt = txt

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

k = A("k")
a = B("a")
m = C("m")
i = D("i")
g = E("g")
l = F("l")
e = E("e")
c = E("c")
j = B("j")
f = A("f")

k.s = e
k.o = j
k.r = f
k.t = g
a.w = j
a.u = k
a.v = k
a.x = i
a.s = f
a.o = m
m.s = l
i.y = c
i.t = l
i.w = m
i.x = j
i.u = a
i.o = k
g.v = a
g.q = f
l.t = a
e.v = j
e.q = k
c.v = j
c.q = k
j.w = a
j.u = k
j.s = k
j.x = i
j.v = f
j.o = m
f.s = g
f.o = j
f.r = k
f.t = e
assert g.v.x.o.r.t.v.s.t.q.txt == "f"