class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: D = None
        self.v: J = None
        self.y: I = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.u: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: J = None
        self.q: C = None
        self.r: I = None
        self.v: A = None
        self.u: A = None
        self.t: A = None
        self.p: H = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.p: G = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: I = None
        self.z: F = None
        self.w: A = None
        self.u: I = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.u: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: J = None
        self.q: C = None
        self.r: I = None
        self.v: A = None
        self.u: A = None
        self.t: A = None
        self.p: H = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.p: G = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: I = None
        self.z: F = None
        self.w: A = None
        self.u: I = None
        self.q: F = None
        self.txt = txt

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

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