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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: G = None
        self.o: E = None
        self.y: J = None
        self.z: A = None
        self.u: D = None
        self.s: J = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: G = None
        self.o: E = None
        self.y: J = None
        self.z: A = None
        self.u: D = None
        self.s: J = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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