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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: D = None
        self.y: G = None
        self.u: F = None
        self.t: H = None
        self.z: C = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: D = None
        self.y: G = None
        self.u: F = None
        self.t: H = None
        self.z: C = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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