class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.q: D = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: I = None
        self.t: I = None
        self.o: E = None
        self.r: A = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: I = None
        self.t: I = None
        self.o: E = None
        self.r: A = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

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