class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.v: G = None
        self.w: H = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: B = None
        self.s: H = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: B = None
        self.s: H = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

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