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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.z: H = None
        self.p: C = None
        self.o: C = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.u: D = None
        self.y: C = None
        self.v: I = None
        self.r: D = None
        self.o: D = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.z: H = None
        self.p: C = None
        self.o: C = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.u: D = None
        self.y: C = None
        self.v: I = None
        self.r: D = None
        self.o: D = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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