class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.t: B = None
        self.p: B = None
        self.y: D = None
        self.txt = txt

h = A("h")
d = B("d")
e = C("e")
k = D("k")
l = E("l")
a = F("a")
b = G("b")
f = A("f")
n = A("n")

h.t = l
h.v = n
h.z = a
h.r = d
d.w = l
e.y = n
e.s = a
e.w = b
e.p = h
k.x = l
k.p = l
l.w = b
a.t = d
a.x = l
a.o = b
b.r = l
b.v = e
b.t = d
b.p = d
b.y = k
f.t = l
f.v = h
f.z = a
f.r = d
n.t = l
n.v = f
n.z = a
n.r = d
assert n.r.w.w.v.s.x.w.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.t: B = None
        self.p: B = None
        self.y: D = None
        self.txt = txt

h = A("h")
d = B("d")
e = C("e")
k = D("k")
l = E("l")
a = F("a")
b = G("b")
f = A("f")
n = A("n")

h.t = l
h.v = n
h.z = a
h.r = d
d.w = l
e.y = n
e.s = a
e.w = b
e.p = h
k.x = l
k.p = l
l.w = b
a.t = d
a.x = l
a.o = b
b.r = l
b.v = e
b.t = d
b.p = d
b.y = k
f.t = l
f.v = h
f.z = a
f.r = d
n.t = l
n.v = f
n.z = a
n.r = d
assert n.r.w.w.v.s.x.w.t.w.txt == "l"