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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.y: E = None
        self.s: G = None
        self.v: E = None
        self.p: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.r: A = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

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

i.w = l
i.u = f
i.r = f
i.y = c
f.z = g
f.r = i
c.w = h
c.r = h
c.y = i
c.o = f
c.t = f
c.u = n
c.z = l
n.w = f
n.o = f
n.z = c
n.y = k
n.v = k
n.s = h
n.p = h
k.s = n
k.v = l
j.z = f
j.y = f
j.p = c
j.q = i
h.q = c
h.u = j
h.w = j
h.r = i
h.o = k
l.z = f
l.y = f
l.p = c
l.q = i
g.q = c
g.u = l
g.w = l
g.r = i
g.o = k
assert n.y.v.z.z.o.s.p.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.y: E = None
        self.s: G = None
        self.v: E = None
        self.p: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.r: A = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

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

i.w = l
i.u = f
i.r = f
i.y = c
f.z = g
f.r = i
c.w = h
c.r = h
c.y = i
c.o = f
c.t = f
c.u = n
c.z = l
n.w = f
n.o = f
n.z = c
n.y = k
n.v = k
n.s = h
n.p = h
k.s = n
k.v = l
j.z = f
j.y = f
j.p = c
j.q = i
h.q = c
h.u = j
h.w = j
h.r = i
h.o = k
l.z = f
l.y = f
l.p = c
l.q = i
g.q = c
g.u = l
g.w = l
g.r = i
g.o = k
assert n.y.v.z.z.o.s.p.r.w.txt == "l"