class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.y: B = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: B = None
        self.t: E = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: B = None
        self.t: E = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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