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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: H = None
        self.x: E = None
        self.v: G = None
        self.p: C = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: H = None
        self.x: E = None
        self.v: G = None
        self.p: C = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

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

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