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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

g = A("g")
n = B("n")
d = C("d")
j = D("j")
l = E("l")
e = F("e")
h = G("h")
i = H("i")
m = C("m")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

g = A("g")
n = B("n")
d = C("d")
j = D("j")
l = E("l")
e = F("e")
h = G("h")
i = H("i")
m = C("m")
k = F("k")

g.x = i
g.p = i
g.z = h
g.s = k
g.t = l
g.w = j
n.w = l
n.x = l
n.s = l
n.p = e
d.r = m
d.z = n
d.v = h
d.s = j
d.y = j
d.w = i
d.q = e
j.r = d
j.t = e
l.q = i
e.s = j
e.q = k
h.p = n
h.u = j
h.v = l
h.s = d
h.r = m
h.y = i
h.z = i
i.z = h
i.x = h
i.q = j
i.u = j
i.y = k
m.r = d
m.z = n
m.v = h
m.s = j
m.y = j
m.w = i
m.q = k
k.s = j
k.q = e
assert k.s.r.r.v.u.r.txt == "d"