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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.s: A = None
        self.p: A = None
        self.q: F = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.s: A = None
        self.p: A = None
        self.q: F = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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