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

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

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

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

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

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

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

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

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

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

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

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

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

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

c.s = k
c.y = f
c.v = a
c.q = i
c.w = j
c.p = l
b.o = g
b.z = k
n.p = f
n.z = f
n.w = g
n.x = a
n.u = j
j.p = a
j.x = i
j.w = k
j.z = l
a.z = i
f.z = g
g.o = l
g.z = k
l.o = b
l.z = j
i.s = j
i.w = j
i.y = f
i.v = a
i.q = c
i.p = g
k.p = a
k.x = c
k.w = j
k.z = l
assert a.z.y.z.o.o.z.w.w.z.txt == "l"