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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.y: E = None
        self.s: D = None
        self.w: G = None
        self.r: B = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: E = None
        self.y: E = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: I = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.z: E = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.x: C = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.y: E = None
        self.s: D = None
        self.w: G = None
        self.r: B = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: E = None
        self.y: E = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: I = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.z: E = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.x: C = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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