class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.v: E = None
        self.o: I = None
        self.q: E = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.s: D = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.p: C = None
        self.s: G = None
        self.u: C = None
        self.y: A = None
        self.t: I = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.p: E = None
        self.t: H = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.p: I = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.s: D = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.p: C = None
        self.s: G = None
        self.u: C = None
        self.y: A = None
        self.t: I = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.p: E = None
        self.t: H = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.p: I = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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