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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

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

g = A("g")
k = B("k")
a = C("a")
m = D("m")
j = E("j")
f = F("f")
l = F("l")
e = A("e")
c = D("c")
n = B("n")

g.y = f
g.o = c
g.t = j
g.u = j
g.w = a
k.z = f
k.q = f
k.p = n
k.s = a
a.o = k
m.w = e
j.q = g
j.o = m
j.s = m
j.p = e
f.q = c
f.v = j
l.q = c
l.v = j
e.y = f
e.o = c
e.t = j
e.u = j
e.w = a
c.w = g
n.z = l
n.q = l
n.p = k
n.s = a
assert f.v.p.y.q.w.w.o.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: D = None
        self.t: E = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

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

g = A("g")
k = B("k")
a = C("a")
m = D("m")
j = E("j")
f = F("f")
l = F("l")
e = A("e")
c = D("c")
n = B("n")

g.y = f
g.o = c
g.t = j
g.u = j
g.w = a
k.z = f
k.q = f
k.p = n
k.s = a
a.o = k
m.w = e
j.q = g
j.o = m
j.s = m
j.p = e
f.q = c
f.v = j
l.q = c
l.v = j
e.y = f
e.o = c
e.t = j
e.u = j
e.w = a
c.w = g
n.z = l
n.q = l
n.p = k
n.s = a
assert f.v.p.y.q.w.w.o.p.z.txt == "l"