class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.u: I = None
        self.y: G = None
        self.x: E = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.z: B = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: B = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.q: G = None
        self.v: E = None
        self.s: G = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.z: B = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: B = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.q: G = None
        self.v: E = None
        self.s: G = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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