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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.txt = txt

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

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