class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.x: F = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: J = None
        self.y: G = None
        self.s: J = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: E = None
        self.w: I = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: J = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: J = None
        self.y: G = None
        self.s: J = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: E = None
        self.w: I = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: J = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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