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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.y: J = None
        self.t: B = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.y: J = None
        self.t: B = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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