class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.u: H = None
        self.v: H = None
        self.o: E = None
        self.z: F = None
        self.t: I = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: F = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.z: F = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.y: B = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: F = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.z: F = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.y: B = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

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

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