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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.w: E = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: F = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.w: E = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

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

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