class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: G = None
        self.z: I = None
        self.r: H = None
        self.u: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.u: A = None
        self.t: B = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: G = None
        self.z: G = None
        self.y: F = None
        self.r: I = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: G = None
        self.z: I = None
        self.r: H = None
        self.u: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.u: A = None
        self.t: B = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: G = None
        self.z: G = None
        self.y: F = None
        self.r: I = None
        self.q: D = None
        self.txt = txt

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

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