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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
k = C("k")
i = D("i")
h = E("h")
c = F("c")
b = D("b")
j = D("j")

e.s = c
e.r = c
e.w = l
e.z = j
l.r = k
l.z = k
l.t = h
k.p = c
i.w = l
h.o = e
h.s = e
h.t = e
h.v = l
h.w = c
c.v = h
c.w = k
b.w = l
j.w = l
assert k.p.v.v.t.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
k = C("k")
i = D("i")
h = E("h")
c = F("c")
b = D("b")
j = D("j")

e.s = c
e.r = c
e.w = l
e.z = j
l.r = k
l.z = k
l.t = h
k.p = c
i.w = l
h.o = e
h.s = e
h.t = e
h.v = l
h.w = c
c.v = h
c.w = k
b.w = l
j.w = l
assert k.p.v.v.t.s.r.txt == "c"