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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: E = None
        self.r: H = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.z: C = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.x: B = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: E = None
        self.r: H = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.z: C = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.x: B = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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