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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.t: G = None
        self.r: A = None
        self.v: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: I = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.t: G = None
        self.r: A = None
        self.v: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: I = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

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

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