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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.z: E = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: G = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.t: C = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.v: A = None
        self.s: A = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.z: E = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: G = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.t: C = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.v: A = None
        self.s: A = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

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

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