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

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

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

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

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

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

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

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

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

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

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

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

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

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

i.s = h
i.q = e
i.r = g
i.v = j
d.x = l
d.p = f
d.r = f
d.s = h
d.u = e
d.v = j
f.v = l
f.x = l
m.w = d
m.s = d
m.x = e
j.q = l
j.u = m
j.o = f
h.y = k
h.x = m
h.o = f
g.s = h
g.q = h
g.r = i
g.v = j
l.w = d
l.s = d
l.x = h
k.s = h
k.q = e
k.r = g
k.v = j
e.y = k
e.x = m
e.o = f
assert j.q.w.p.v.s.v.q.txt == "l"