class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: J = None
        self.p: A = None
        self.s: J = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.y: B = None
        self.x: H = None
        self.t: H = None
        self.w: G = None
        self.p: J = None
        self.o: J = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: J = None
        self.p: A = None
        self.s: J = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.y: B = None
        self.x: H = None
        self.t: H = None
        self.w: G = None
        self.p: J = None
        self.o: J = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

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