class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.t: D = None
        self.s: E = None
        self.y: I = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.u: A = None
        self.z: E = None
        self.x: G = None
        self.v: A = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.t: D = None
        self.s: E = None
        self.y: I = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.u: A = None
        self.z: E = None
        self.x: G = None
        self.v: A = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

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

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