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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

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

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