class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.q: H = None
        self.s: J = None
        self.w: E = None
        self.v: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: B = None
        self.y: C = None
        self.r: E = None
        self.x: J = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.w: G = None
        self.o: F = None
        self.u: H = None
        self.t: G = None
        self.s: J = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.u: H = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.o: C = None
        self.s: E = None
        self.y: F = None
        self.v: E = None
        self.z: D = None
        self.x: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: A = None
        self.x: D = None
        self.q: J = None
        self.z: H = None
        self.t: B = None
        self.p: D = None
        self.r: H = None
        self.w: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.q: H = None
        self.s: J = None
        self.w: E = None
        self.v: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: B = None
        self.y: C = None
        self.r: E = None
        self.x: J = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.w: G = None
        self.o: F = None
        self.u: H = None
        self.t: G = None
        self.s: J = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.u: H = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.o: C = None
        self.s: E = None
        self.y: F = None
        self.v: E = None
        self.z: D = None
        self.x: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: A = None
        self.x: D = None
        self.q: J = None
        self.z: H = None
        self.t: B = None
        self.p: D = None
        self.r: H = None
        self.w: J = None
        self.txt = txt

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

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

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