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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.v: D = None
        self.t: G = None
        self.r: G = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.v: G = None
        self.r: F = None
        self.t: G = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

j = A("j")
h = B("h")
a = C("a")
m = D("m")
i = E("i")
g = F("g")
e = G("e")
b = G("b")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.v: D = None
        self.t: G = None
        self.r: G = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.v: G = None
        self.r: F = None
        self.t: G = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

j = A("j")
h = B("h")
a = C("a")
m = D("m")
i = E("i")
g = F("g")
e = G("e")
b = G("b")

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