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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.r: D = None
        self.w: E = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

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

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

j.v = b
h.r = m
d.w = l
m.z = b
m.x = b
m.o = l
m.w = j
m.v = j
m.s = j
i.s = m
i.r = m
i.y = m
i.v = h
i.w = b
i.z = a
k.o = h
k.t = b
a.r = m
l.o = a
l.t = i
c.w = l
b.s = m
b.r = m
b.y = m
b.v = a
b.z = a
b.w = i
assert h.r.w.v.s.x.w.v.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.r: D = None
        self.w: E = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

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

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

j.v = b
h.r = m
d.w = l
m.z = b
m.x = b
m.o = l
m.w = j
m.v = j
m.s = j
i.s = m
i.r = m
i.y = m
i.v = h
i.w = b
i.z = a
k.o = h
k.t = b
a.r = m
l.o = a
l.t = i
c.w = l
b.s = m
b.r = m
b.y = m
b.v = a
b.z = a
b.w = i
assert h.r.w.v.s.x.w.v.r.s.txt == "j"