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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.p: A = None
        self.v: H = None
        self.r: H = None
        self.o: E = None
        self.t: H = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.x: G = None
        self.t: E = None
        self.u: D = None
        self.q: D = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.u: H = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.p: A = None
        self.v: H = None
        self.r: H = None
        self.o: E = None
        self.t: H = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.x: G = None
        self.t: E = None
        self.u: D = None
        self.q: D = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.u: H = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

d.w = f
l.z = d
l.u = a
b.z = l
b.p = l
b.q = l
b.v = l
b.y = d
b.u = a
k.u = a
k.z = a
k.x = n
k.v = n
k.t = n
k.p = d
k.r = c
k.o = i
i.z = d
i.x = b
i.v = a
i.o = c
f.w = i
f.t = i
f.z = i
f.o = a
f.x = a
f.u = k
f.q = k
a.z = l
a.r = e
n.q = b
n.w = b
n.u = c
n.y = d
n.t = a
c.q = b
c.w = b
c.u = n
c.y = d
c.t = a
e.u = a
e.z = a
e.x = c
e.r = c
e.t = c
e.p = d
e.v = n
e.o = i
assert b.u.z.u.r.z.r.v.txt == "n"