class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.p: F = None
        self.u: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.x: F = None
        self.q: A = None
        self.t: A = None
        self.p: A = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.s: H = None
        self.z: I = None
        self.w: I = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.y: I = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: H = None
        self.s: H = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.p: F = None
        self.u: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.x: F = None
        self.q: A = None
        self.t: A = None
        self.p: A = None
        self.o: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.s: H = None
        self.z: I = None
        self.w: I = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.y: I = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: H = None
        self.s: H = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

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

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