class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.r: G = None
        self.t: F = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: C = None
        self.q: B = None
        self.y: B = None
        self.s: A = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

d = A("d")
m = B("m")
l = C("l")
h = D("h")
e = E("e")
b = F("b")
a = G("a")
g = H("g")
c = E("c")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: C = None
        self.q: B = None
        self.y: B = None
        self.s: A = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

d = A("d")
m = B("m")
l = C("l")
h = D("h")
e = E("e")
b = F("b")
a = G("a")
g = H("g")
c = E("c")

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