class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.x: C = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: B = None
        self.x: I = None
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: B = None
        self.r: B = None
        self.s: F = None
        self.p: B = None
        self.q: B = None
        self.x: J = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.x: C = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: B = None
        self.x: I = None
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: B = None
        self.r: B = None
        self.s: F = None
        self.p: B = None
        self.q: B = None
        self.x: J = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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