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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.t: A = None
        self.s: F = None
        self.w: E = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: F = None
        self.t: A = None
        self.s: F = None
        self.w: E = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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