class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.t: B = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: I = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: I = None
        self.w: F = None
        self.txt = txt

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

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

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