class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.p: I = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: I = None
        self.x: I = None
        self.z: D = None
        self.o: D = None
        self.v: G = None
        self.q: G = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.z: H = None
        self.u: E = None
        self.q: B = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.y: F = None
        self.o: H = None
        self.r: F = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.s: H = None
        self.r: A = None
        self.o: I = None
        self.t: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

k = A("k")
l = B("l")
c = C("c")
a = D("a")
d = E("d")
m = F("m")
j = G("j")
n = H("n")
e = I("e")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: I = None
        self.x: I = None
        self.z: D = None
        self.o: D = None
        self.v: G = None
        self.q: G = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.z: H = None
        self.u: E = None
        self.q: B = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.y: F = None
        self.o: H = None
        self.r: F = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.s: H = None
        self.r: A = None
        self.o: I = None
        self.t: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

k = A("k")
l = B("l")
c = C("c")
a = D("a")
d = E("d")
m = F("m")
j = G("j")
n = H("n")
e = I("e")

k.z = e
k.p = e
k.r = d
k.t = j
l.s = n
l.w = e
l.x = e
l.z = a
l.o = a
l.u = a
l.v = j
l.q = j
l.p = c
c.t = k
c.x = j
c.v = j
c.z = n
c.o = n
c.u = d
c.q = l
a.u = k
a.x = d
a.y = m
a.r = m
a.w = m
a.o = n
a.s = c
d.z = c
d.q = m
d.s = n
d.t = n
d.r = k
d.o = e
d.v = e
m.w = a
m.z = k
m.q = l
j.p = m
n.r = l
e.w = j
e.r = n
e.t = n
e.z = k
e.q = k
assert a.x.z.v.p.w.u.p.q.r.txt == "d"