class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.t: D = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: H = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.x: C = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.v: D = None
        self.txt = txt

i = A("i")
j = B("j")
b = C("b")
c = D("c")
k = E("k")
n = F("n")
d = G("d")
g = H("g")
h = I("h")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: H = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.x: C = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.v: D = None
        self.txt = txt

i = A("i")
j = B("j")
b = C("b")
c = D("c")
k = E("k")
n = F("n")
d = G("d")
g = H("g")
h = I("h")
a = D("a")

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