class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: F = None
        self.z: F = None
        self.s: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.y: G = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: B = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: C = None
        self.p: G = None
        self.x: C = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.y: G = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: B = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: C = None
        self.p: G = None
        self.x: C = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

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