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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

i = A("i")
h = B("h")
m = C("m")
e = D("e")
l = E("l")
n = F("n")
f = F("f")
b = F("b")

i.w = n
i.o = h
i.v = m
h.u = i
h.p = i
h.r = l
h.s = l
m.o = b
m.w = b
m.x = e
m.p = e
m.r = l
m.v = h
e.s = m
l.u = n
l.o = e
n.r = l
n.w = m
n.y = e
n.u = e
f.r = l
f.w = m
f.y = e
f.u = e
b.r = l
b.w = m
b.y = e
b.u = e
assert n.u.s.w.w.r.o.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

i = A("i")
h = B("h")
m = C("m")
e = D("e")
l = E("l")
n = F("n")
f = F("f")
b = F("b")

i.w = n
i.o = h
i.v = m
h.u = i
h.p = i
h.r = l
h.s = l
m.o = b
m.w = b
m.x = e
m.p = e
m.r = l
m.v = h
e.s = m
l.u = n
l.o = e
n.r = l
n.w = m
n.y = e
n.u = e
f.r = l
f.w = m
f.y = e
f.u = e
b.r = l
b.w = m
b.y = e
b.u = e
assert n.u.s.w.w.r.o.s.o.txt == "b"