class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.r: F = None
        self.o: H = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.q: E = None
        self.p: E = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.r: E = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.q: E = None
        self.p: E = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.r: E = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

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