class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: D = None
        self.o: B = None
        self.s: B = None
        self.w: D = None
        self.u: B = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.y: J = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: J = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: B = None
        self.t: B = None
        self.q: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.w: E = None
        self.y: G = None
        self.x: H = None
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: D = None
        self.o: B = None
        self.s: B = None
        self.w: D = None
        self.u: B = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.y: J = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: J = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: A = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: B = None
        self.t: B = None
        self.q: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.w: E = None
        self.y: G = None
        self.x: H = None
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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