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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.p: A = None
        self.o: A = None
        self.x: B = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.q: D = None
        self.w: A = None
        self.o: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.p: A = None
        self.o: A = None
        self.x: B = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.q: D = None
        self.w: A = None
        self.o: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

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