class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: E = None
        self.x: G = None
        self.s: D = None
        self.o: F = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: H = None
        self.t: D = None
        self.w: A = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.t: E = None
        self.s: F = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: D = None
        self.p: B = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.s: A = None
        self.z: F = None
        self.t: B = None
        self.o: J = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.u: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: H = None
        self.t: D = None
        self.w: A = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.t: E = None
        self.s: F = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: D = None
        self.p: B = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.s: A = None
        self.z: F = None
        self.t: B = None
        self.o: J = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.u: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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