class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.o: F = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: B = None
        self.v: B = None
        self.x: A = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.o: F = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: B = None
        self.v: B = None
        self.x: A = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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