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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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