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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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