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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

k = A("k")
l = B("l")
j = C("j")
b = D("b")
m = E("m")
f = F("f")
e = G("e")
i = A("i")
n = E("n")
g = F("g")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

k = A("k")
l = B("l")
j = C("j")
b = D("b")
m = E("m")
f = F("f")
e = G("e")
i = A("i")
n = E("n")
g = F("g")

k.x = n
k.v = i
k.z = e
l.u = n
l.r = e
j.z = e
j.x = e
b.z = j
b.r = k
b.x = l
b.w = l
b.y = n
b.o = i
m.z = l
m.w = l
f.z = j
f.o = j
f.v = l
f.q = b
f.r = m
f.s = i
e.s = b
i.x = m
i.v = k
i.z = e
n.z = l
n.w = l
g.z = j
g.o = j
g.v = l
g.q = b
g.r = n
g.s = i
assert l.r.s.w.u.txt == "n"