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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: A = None
        self.y: B = None
        self.u: J = None
        self.v: A = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: F = None
        self.s: J = None
        self.p: J = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.s: G = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.w: H = None
        self.u: E = None
        self.t: D = None
        self.p: B = None
        self.o: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: A = None
        self.y: B = None
        self.u: J = None
        self.v: A = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: F = None
        self.s: J = None
        self.p: J = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.s: G = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.w: H = None
        self.u: E = None
        self.t: D = None
        self.p: B = None
        self.o: I = None
        self.txt = txt

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

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