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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.z: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: J = None
        self.s: A = None
        self.r: I = None
        self.x: I = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: A = None
        self.r: A = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.z: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: J = None
        self.s: A = None
        self.r: I = None
        self.x: I = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: A = None
        self.r: A = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

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

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